I wrote the code for Resize, saved it and compiled it. But it does not compile. Instead, it gives a super long error message.

~/workspace/pset4/resize/ $ make resize
clang -fsanitize=integer -fsanitize=undefined -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wshadow    resize.c  -lcrypt -lcs50 -lm -o resize
0  libLLVM-3.6.so.1 0x00002ac686e1b912 llvm::sys::PrintStackTrace(_IO_FILE*) + 34
1  libLLVM-3.6.so.1 0x00002ac686e19eb1
2  libpthread.so.0  0x00002ac687b12330
3  libpthread.so.0  0x0000000001cde7d0
Stack dump:
0.      Program arguments: /usr/lib/llvm-3.6/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name resize.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.24 -g -dwarf-column-info -resource-dir /usr/lib/llvm-3.6/bin/../lib/clang/3.6.0 -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-3.6/bin/../lib/clang/3.6.0/include -internal-externc-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -Wall -Werror -Wextra -Wno-sign-compare -Wshadow -std=c11 -fdebug-compilation-dir /home/ubuntu/workspace/pset4/resize -ferror-limit 19 -fmessage-length 150 -fsanitize=alignment,array-bounds,bool,enum,float-cast-overflow,float-divide-by-zero,function,integer-divide-by-zero,nonnull-attribute,null,object-size,return,returns-nonnull-attribute,shift,signed-integer-overflow,unreachable,vla-bound,vptr,unsigned-integer-overflow -fsanitize-recover=alignment,array-bounds,bool,enum,float-cast-overflow,float-divide-by-zero,function,integer-divide-by-zero,nonnull-attribute,null,object-size,returns-nonnull-attribute,shift,signed-integer-overflow,vla-bound,vptr,unsigned-integer-overflow -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/resize-87afd6.o -x c resize.c 
1.      resize.c:66:154: current parser token ')'
2.      resize.c:11:1: parsing function body 'main'
3.      resize.c:11:1: in compound statement ('{}')
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Ubuntu clang version 3.6.0-2ubuntu1~trusty1 (tags/RELEASE_360/final) (based on LLVM 3.6.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://bugs.debian.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: 

Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/resize-dcf8bc.c
clang: note: diagnostic msg: /tmp/resize-dcf8bc.sh
clang: note: diagnostic msg: 

make: *** [resize] Error 254
~/workspace/pset4/resize/ $ 

The IDE told me that I had an older version of the IDE. I updated (using update50) and restarted the IDE. But it still shows the same error message.

  • Wow. That one is odd. And does not help much, other than a potential code problem being somewhere at or before line 66. Compiling other things works? If so, maybe your code is invalid, but in a way the author of the compiler did not anticipate? If the compiler works otherwise, try searching anything before or at line 66. Maybe the compiler sees something you did not mean.
    – Blauelf
    Aug 11, 2017 at 11:56
  • Did you close the terminal window and open a new one?
    – Cliff B
    Aug 11, 2017 at 18:50


You must log in to answer this question.

Browse other questions tagged .