Thread: Macro Help
View Single Post
Old February 19, 2015, 23:32   #4
PosChengband Maintainer
Join Date: Jan 2008
Posts: 702
chris is on a distinguished road
Apologies for posting in the wrong thread before. I was asking for help with linux -fsanitize.

(On a tablet, so forgive the brevity)

Output: there may be an option or env variable you can set to force sanitizer output to a file. If not, I'm pretty sure you can just redirect stderr to a file, eg using "2>&1 myfile" as the last part of the command line. (The reason the output is mangled is that ncurses disables newlines on the terminal.)

About the missing "undefined": see the gcc manual, i was workingfrom memory and the option may be a little different, something to do with "undefined behavior". It's possible that the option wasn't available in gcc 4.8.

Generally i'd recommend clang when using the sanitizer since it usually has more recent support. (And is mostly cmdline compatible with gcc.)
Thanks. gcc 4.9 got -fsanitize=undefined but hasn't been released yet on Mint. I managed to upgrade, though.

For the record, I've had a lot of problems finding documentation. The gcc manual barely mentions these options. Eventually, I found this. I've never heard of clang before. Is this a substitute for gcc?

Thanks, again for your patience.

Edit: I just found this as well.
chris is offline   Reply With Quote