Assignment 5 advice/faq

Written by Julie Zelenski

This is a recently refreshed assignment, so we don't yet now what issues you might run into, but we will update this page throughout the week with answers to whatever common questions we hear from you in office hours and on Piazza.

Common questions


For float exploring, can the two different tools both be programming languages? Is it okay if the two different tools have similar results?

I think the exercise will be more valuable if you explore more broadly so I would encourage trying to branch out a little. (e.g. confirming that C++ behaves like C? meh.) I recommend picking from two different categories at least. In terms of what turns up, I expect you won't find much that is not IEEE-based, but if you do, it will definitely make for more interesting explorations!

When I invoke bbsort with unsupported command-line flags, it doesn't seem to reject as invalid usage. What gives?

Generally a program is designed to accept only its supported flags and reject all others, end of story. Yet you will observe that bbsort is oddly indecisive. It receives many flags without complaint for which it either does something wrong or ignores them. What's that about? It turns out bbsort is written with a configurable switch to support either a small or large feature set, but when set to use the small feature set, it fails to properly constrain all programs aspects to the limited set. Looks like someone may not have fully tested this switch!

When using gdb on bbsort, there are complaints about missing files. What is this and what should I do about it?

Breakpoint 1, __GI_qsort (b=0x605270, n=24, s=8, cmp=0x401439 <compare_keys>) at msort.c:308
308  msort.c: No such file or directory.

When stopped at a breakpoint or during single stepping, gdb wants to show the next line of the C source. In this case, the source file it is looking for is not available, thus gdb reports "No such file". There is no error, the program is executing normally, and the assembly code is available (use disassemble to view it). The message is simply reporting that the C source is not available for viewing. You can step, continue, finish, etc. to move on from here.