jarun/bcal

pinboost_debug.cc:98:17: error: ‘%s’ directive writing up to 1023 bytes into a region of size 999 [-Werror=format-overflow=]

ahmadsb101 opened this issue · 1 comments

After doing exactly by tutorial for Sniper-7.2 i encountered with this error during make.
i am running on Linux localhost 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux
and the gcc is gcc version 8.3.0 (Debian 8.3.0-6)
the output of make in sniper directory is:

Building for x86 (intel64)
[CXX ] sift/recorder/obj-intel64/pinboost_debug.o
pinboost_debug.cc: In function ‘bool pinboost_backtrace(LEVEL_BASE::EXCEPTION_INFO*, LEVEL_VM::PHYSICAL_CONTEXT*)’:
pinboost_debug.cc:98:17: error: ‘%s’ directive writing up to 1023 bytes into a region of size 999 [-Werror=format-overflow=]
sprintf(cmd, "%s/tools/gen_backtrace.py "%s" >&2", getenv("SNIPER_ROOT"), backtrace_filename);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
pinboost_debug.cc:98:11: note: ‘sprintf’ output 31 or more bytes (assuming 1054) into a destination of size 1024
sprintf(cmd, "%s/tools/gen_backtrace.py "%s" >&2", getenv("SNIPER_ROOT"), backtrace_filename);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: [makefile.rules:133: obj-intel64/pinboost_debug.o] Error 1
make[1]: [Makefile:50: recorder] Error 2
make: [Makefile:51: /home/ahmad/SOFTWARE/snipersim/sniper-7.2/sift/libsift.a] Error 2

How to overcome with this error?

jarun commented

I don't see the involvement of bcal in this error. This looks like a sniper compilation issue.