https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111974
Bug ID: 111974 Summary: internal error: Segmentation fault on Ubuntu 23.10 (x86-64) Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: basile at starynkevitch dot net Target Milestone: --- I uploaded to refpersys.org/refpersys-gcc13bug-snapshot-25oct2023-git041d5d70aefd0.tar.bz2 a compressed tarball (29246912 bytes) of md5sum 6b1d2985ce86bd1718d05af3d93a84f9 RefPerSys is a GPLv3+ open source project for an inference engine. See http://refpersys.org/ for details. The code repository of RefPerSys is on gihtub. See the commit https://github.com/RefPerSys/RefPerSys/commit/041d5d70aefd047de4eb456432853beefffb4120 On Ubuntu 23.10 (x86-64 desktop with AMD Ryzen Threadripper 2970WX) this tarball is crashing the GCC 13.2 compiler with a reproducible GCC compiler bug. To reproduce, (using GNU make 4.3) run make cmdrepl_rps.o which crashes with rimski.x86_64 ~/RefPerSys 11:17 .0 % make cmdrepl_rps.o /usr/bin/time --append --format='%C : %S sys, %U user, %E elapsed; %M RSS' --output=_build.time g++-13 -std=gnu++17 -O1 -g3 -fPIC -Wall -Wextra -I. -I/usr/local/include -I/usr/include -I/usr/include/jsoncpp -I/usr/include/jsoncpp -I/usr/include/jsoncpp -I/usr/include/x86_64-linux-gnu -I/usr/local/include/ -DRPS_ARCH=\"x86_64\" -DRPS_HAVE_ARCH_x86_64 -DRPS_OPERSYS=\"GNU_Linux\" -DRPS_HAVE_OPERSYS_GNU_Linux -DRPS_GITID=\"041d5d70aefd047de4eb456432853beefffb4120+\" -DRPS_SHORTGITID=\"041d5d70aefd+\" -I/usr/src/Libs/lightning/include/lightning -std=gnu++17 -c -o cmdrepl_rps.o cmdrepl_rps.cc cmdrepl_rps.cc:51:2: warning: #warning should declare rps_full_evaluate_repl_instance [-Wcpp] 51 | #warning should declare rps_full_evaluate_repl_instance | ^~~~~~~ cmdrepl_rps.cc:146:2: warning: #warning rps_full_evaluate_repl_expr should check that envob is an environment, with bindings and optional parent env.... [-Wcpp] 146 | #warning rps_full_evaluate_repl_expr should check that envob is an environment, with bindings and optional parent env.... | ^~~~~~~ cmdrepl_rps.cc:180:2: warning: #warning TODO: should probably define and call a rps_full_evaluate_repl_instance [-Wcpp] 180 | #warning TODO: should probably define and call a rps_full_evaluate_repl_instance | ^~~~~~~ cmdrepl_rps.cc:303:2: warning: #warning TODO: fixme evaluation of various repl_expression-s e.g. conditional, arithmetic, application [-Wcpp] 303 | #warning TODO: fixme evaluation of various repl_expression-s e.g. conditional, arithmetic, application | ^~~~~~~ cmdrepl_rps.cc:344:2: warning: #warning unimplemented rps_full_evaluate_repl_composite_object [-Wcpp] 344 | #warning unimplemented rps_full_evaluate_repl_composite_object | ^~~~~~~ cmdrepl_rps.cc:771:2: warning: #warning unimplemented Rps_CallFrame::interpret_repl_statement [-Wcpp] 771 | #warning unimplemented Rps_CallFrame::interpret_repl_statement | ^~~~~~~ cmdrepl_rps.cc:930:2: warning: #warning rpsapply_61pgHb5KRq600RLnKD should use wordexp(3) on the string [-Wcpp] 930 | #warning rpsapply_61pgHb5KRq600RLnKD should use wordexp(3) on the string | ^~~~~~~ cmdrepl_rps.cc:939:2: warning: #warning incomplete rpsapply_61pgHb5KRq600RLnKD for REPL command dump [-Wcpp] 939 | #warning incomplete rpsapply_61pgHb5KRq600RLnKD for REPL command dump | ^~~~~~~ cmdrepl_rps.cc:1050:2: warning: #warning we probably want to display some common payloads here [-Wcpp] 1050 | #warning we probably want to display some common payloads here | ^~~~~~~ cmdrepl_rps.cc:1115:2: warning: #warning REPL command show may need some local Rps_TokenSource [-Wcpp] 1115 | #warning REPL command show may need some local Rps_TokenSource | ^~~~~~~ cmdrepl_rps.cc:1206:2: warning: #warning this code should be moved into rps_show_object_for_repl above [-Wcpp] 1206 | #warning this code should be moved into rps_show_object_for_repl above | ^~~~~~~ cmdrepl_rps.cc:1212:2: warning: #warning incomplete rpsapply_7WsQyJK6lty02uz5KT should define and call rps_show_instance_for_repl [-Wcpp] 1212 | #warning incomplete rpsapply_7WsQyJK6lty02uz5KT should define and call rps_show_instance_for_repl | ^~~~~~~ cmdrepl_rps.cc:1220:2: warning: #warning incomplete rpsapply_7WsQyJK6lty02uz5KT for REPL command show [-Wcpp] 1220 | #warning incomplete rpsapply_7WsQyJK6lty02uz5KT for REPL command show | ^~~~~~~ cmdrepl_rps.cc:1262:2: warning: #warning incomplete rpsapply_2TZNwgyOdVd001uasl for REPL command help [-Wcpp] 1262 | #warning incomplete rpsapply_2TZNwgyOdVd001uasl for REPL command help | ^~~~~~~ cmdrepl_rps.cc:1298:2: warning: #warning incomplete rpsapply_28DGtmXCyOX02AuPLd for REPL command put [-Wcpp] 1298 | #warning incomplete rpsapply_28DGtmXCyOX02AuPLd for REPL command put | ^~~~~~~ cmdrepl_rps.cc:1333:2: warning: #warning incomplete rpsapply_09ehnxiXQKo006cZer for REPL command remove [-Wcpp] 1333 | #warning incomplete rpsapply_09ehnxiXQKo006cZer for REPL command remove | ^~~~~~~ cmdrepl_rps.cc:1370:2: warning: #warning incomplete rpsapply_9LCCu7TQI0Z0166mw3 for REPL command append [-Wcpp] 1370 | #warning incomplete rpsapply_9LCCu7TQI0Z0166mw3 for REPL command append | ^~~~~~~ cmdrepl_rps.cc:1405:2: warning: #warning incomplete rpsapply_982LHCTfHdC02o4a6Q for REPL command add_root [-Wcpp] 1405 | #warning incomplete rpsapply_982LHCTfHdC02o4a6Q for REPL command add_root | ^~~~~~~ cmdrepl_rps.cc:1440:2: warning: #warning incomplete rpsapply_2G5DNSyfWoP002Vv6X for REPL command remove_root [-Wcpp] 1440 | #warning incomplete rpsapply_2G5DNSyfWoP002Vv6X for REPL command remove_root | ^~~~~~~ cmdrepl_rps.cc:1475:2: warning: #warning incomplete rpsapply_55RPnvwSLXz028jyDk for REPL command make_symbol [-Wcpp] 1475 | #warning incomplete rpsapply_55RPnvwSLXz028jyDk for REPL command make_symbol | ^~~~~~~ cmdrepl_rps.cc: In function ‘Rps_TwoValues rps_full_evaluate_repl_expr(Rps_CallFrame*, Rps_Value, Rps_ObjectRef)’: cmdrepl_rps.cc:64:12: warning: unused variable ‘startdbgflags’ [-Wunused-variable] 64 | unsigned startdbgflags = rps_debug_flags.load(); | ^~~~~~~~~~~~~ cmdrepl_rps.cc: In function ‘Rps_Value rps_environment_get_shallow_bound_value(Rps_ObjectRef, Rps_ObjectRef, bool*)’: cmdrepl_rps.cc:461:8: warning: unused variable ‘missing’ [-Wunused-variable] 461 | bool missing= false; | ^~~~~~~ cmdrepl_rps.cc: In function ‘int rps_environment_find_binding_depth(Rps_ObjectRef, Rps_ObjectRef)’: cmdrepl_rps.cc:495:12: warning: unused variable ‘missing’ [-Wunused-variable] 495 | bool missing = true; | ^~~~~~~ cmdrepl_rps.cc: In function ‘void rpsldpy_environment(Rps_ObjectZone*, Rps_Loader*, const Json::Value&, Rps_Id, unsigned int)’: cmdrepl_rps.cc:740:87: warning: unused parameter ‘spacid’ [-Wunused-parameter] 740 | rpsldpy_environment (Rps_ObjectZone*obz, Rps_Loader*ld, const Json::Value& jv, Rps_Id spacid, unsigned lineno) | ~~~~~~~^~~~~~ cmdrepl_rps.cc:740:104: warning: unused parameter ‘lineno’ [-Wunused-parameter] 740 | ronment (Rps_ObjectZone*obz, Rps_Loader*ld, const Json::Value& jv, Rps_Id spacid, unsigned lineno) | ~~~~~~~~~^~~~~~ cmdrepl_rps.cc: In function ‘void rps_show_object_for_repl(Rps_CallFrame*, Rps_ObjectRef, std::ostream*, unsigned int)’: cmdrepl_rps.cc:969:40: warning: unused parameter ‘depth’ [-Wunused-parameter] 969 | unsigned depth) | ~~~~~~~~~^~~~~ cmdrepl_rps.cc: In lambda function: cmdrepl_rps.cc:1096:55: warning: unused parameter ‘gc’ [-Wunused-parameter] 1096 | _.set_additional_gc_marker([&](Rps_GarbageCollector*gc) | ~~~~~~~~~~~~~~~~~~~~~^~ cmdrepl_rps.cc: In function ‘Rps_TwoValues rpsapply_2TZNwgyOdVd001uasl(Rps_CallFrame*, Rps_Value, Rps_Value, Rps_Value, Rps_Value, const std::vector<Rps_Value>*)’: refpersys.hh:4028:9: warning: unused variable ‘_f’ [-Wunused-variable] 4028 | auto& _f = *_.fieldsptr(); \ | ^~ refpersys.hh:4037:3: note: in expansion of macro ‘RPS_LOCALFRAME_ATBIS’ 4037 | RPS_LOCALFRAME_ATBIS(Lin,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~ refpersys.hh:4039:3: note: in expansion of macro ‘RPS_LOCALFRAME_AT’ 4039 | RPS_LOCALFRAME_AT(__LINE__,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~ cmdrepl_rps.cc:1247:3: note: in expansion of macro ‘RPS_LOCALFRAME’ 1247 | RPS_LOCALFRAME(/*descr:*/Rps_ObjectRef::really_find_object_by_oid(descoid), | ^~~~~~~~~~~~~~ cmdrepl_rps.cc: In function ‘Rps_TwoValues rpsapply_28DGtmXCyOX02AuPLd(Rps_CallFrame*, Rps_Value, Rps_Value, Rps_Value, Rps_Value, const std::vector<Rps_Value>*)’: refpersys.hh:4028:9: warning: unused variable ‘_f’ [-Wunused-variable] 4028 | auto& _f = *_.fieldsptr(); \ | ^~ refpersys.hh:4037:3: note: in expansion of macro ‘RPS_LOCALFRAME_ATBIS’ 4037 | RPS_LOCALFRAME_ATBIS(Lin,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~ refpersys.hh:4039:3: note: in expansion of macro ‘RPS_LOCALFRAME_AT’ 4039 | RPS_LOCALFRAME_AT(__LINE__,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~ cmdrepl_rps.cc:1282:3: note: in expansion of macro ‘RPS_LOCALFRAME’ 1282 | RPS_LOCALFRAME(/*descr:*/Rps_ObjectRef::really_find_object_by_oid(descoid), | ^~~~~~~~~~~~~~ cmdrepl_rps.cc: In function ‘Rps_TwoValues rpsapply_09ehnxiXQKo006cZer(Rps_CallFrame*, Rps_Value, Rps_Value, Rps_Value, Rps_Value, const std::vector<Rps_Value>*)’: refpersys.hh:4028:9: warning: unused variable ‘_f’ [-Wunused-variable] 4028 | auto& _f = *_.fieldsptr(); \ | ^~ refpersys.hh:4037:3: note: in expansion of macro ‘RPS_LOCALFRAME_ATBIS’ 4037 | RPS_LOCALFRAME_ATBIS(Lin,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~ refpersys.hh:4039:3: note: in expansion of macro ‘RPS_LOCALFRAME_AT’ 4039 | RPS_LOCALFRAME_AT(__LINE__,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~ cmdrepl_rps.cc:1318:3: note: in expansion of macro ‘RPS_LOCALFRAME’ 1318 | RPS_LOCALFRAME(/*descr:*/Rps_ObjectRef::really_find_object_by_oid(descoid), | ^~~~~~~~~~~~~~ cmdrepl_rps.cc: In function ‘Rps_TwoValues rpsapply_9LCCu7TQI0Z0166mw3(Rps_CallFrame*, Rps_Value, Rps_Value, Rps_Value, Rps_Value, const std::vector<Rps_Value>*)’: refpersys.hh:4028:9: warning: unused variable ‘_f’ [-Wunused-variable] 4028 | auto& _f = *_.fieldsptr(); \ | ^~ refpersys.hh:4037:3: note: in expansion of macro ‘RPS_LOCALFRAME_ATBIS’ 4037 | RPS_LOCALFRAME_ATBIS(Lin,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~ refpersys.hh:4039:3: note: in expansion of macro ‘RPS_LOCALFRAME_AT’ 4039 | RPS_LOCALFRAME_AT(__LINE__,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~ cmdrepl_rps.cc:1353:3: note: in expansion of macro ‘RPS_LOCALFRAME’ 1353 | RPS_LOCALFRAME(/*descr:*/Rps_ObjectRef::really_find_object_by_oid(descoid), | ^~~~~~~~~~~~~~ cmdrepl_rps.cc: In function ‘Rps_TwoValues rpsapply_982LHCTfHdC02o4a6Q(Rps_CallFrame*, Rps_Value, Rps_Value, Rps_Value, Rps_Value, const std::vector<Rps_Value>*)’: refpersys.hh:4028:9: warning: unused variable ‘_f’ [-Wunused-variable] 4028 | auto& _f = *_.fieldsptr(); \ | ^~ refpersys.hh:4037:3: note: in expansion of macro ‘RPS_LOCALFRAME_ATBIS’ 4037 | RPS_LOCALFRAME_ATBIS(Lin,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~ refpersys.hh:4039:3: note: in expansion of macro ‘RPS_LOCALFRAME_AT’ 4039 | RPS_LOCALFRAME_AT(__LINE__,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~ cmdrepl_rps.cc:1390:3: note: in expansion of macro ‘RPS_LOCALFRAME’ 1390 | RPS_LOCALFRAME(/*descr:*/Rps_ObjectRef::really_find_object_by_oid(descoid), | ^~~~~~~~~~~~~~ cmdrepl_rps.cc: In function ‘Rps_TwoValues rpsapply_2G5DNSyfWoP002Vv6X(Rps_CallFrame*, Rps_Value, Rps_Value, Rps_Value, Rps_Value, const std::vector<Rps_Value>*)’: refpersys.hh:4028:9: warning: unused variable ‘_f’ [-Wunused-variable] 4028 | auto& _f = *_.fieldsptr(); \ | ^~ refpersys.hh:4037:3: note: in expansion of macro ‘RPS_LOCALFRAME_ATBIS’ 4037 | RPS_LOCALFRAME_ATBIS(Lin,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~ refpersys.hh:4039:3: note: in expansion of macro ‘RPS_LOCALFRAME_AT’ 4039 | RPS_LOCALFRAME_AT(__LINE__,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~ cmdrepl_rps.cc:1424:3: note: in expansion of macro ‘RPS_LOCALFRAME’ 1424 | RPS_LOCALFRAME(/*descr:*/Rps_ObjectRef::really_find_object_by_oid(descoid), | ^~~~~~~~~~~~~~ cmdrepl_rps.cc: In function ‘Rps_TwoValues rpsapply_55RPnvwSLXz028jyDk(Rps_CallFrame*, Rps_Value, Rps_Value, Rps_Value, Rps_Value, const std::vector<Rps_Value>*)’: refpersys.hh:4028:9: warning: unused variable ‘_f’ [-Wunused-variable] 4028 | auto& _f = *_.fieldsptr(); \ | ^~ refpersys.hh:4037:3: note: in expansion of macro ‘RPS_LOCALFRAME_ATBIS’ 4037 | RPS_LOCALFRAME_ATBIS(Lin,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~ refpersys.hh:4039:3: note: in expansion of macro ‘RPS_LOCALFRAME_AT’ 4039 | RPS_LOCALFRAME_AT(__LINE__,Descr,Prev,__VA_ARGS__) | ^~~~~~~~~~~~~~~~~ cmdrepl_rps.cc:1458:3: note: in expansion of macro ‘RPS_LOCALFRAME’ 1458 | RPS_LOCALFRAME(/*descr:*/Rps_ObjectRef::really_find_object_by_oid(descoid), | ^~~~~~~~~~~~~~ cmdrepl_rps.cc: In function ‘Rps_TwoValues rpsapply_2G5DNSyfWoP002Vv6X(Rps_CallFrame*, Rps_Value, Rps_Value, Rps_Value, Rps_Value, const std::vector<Rps_Value>*)’: cmdrepl_rps.cc:1415:1: internal compiler error: Segmentation fault 1415 | rpsapply_2G5DNSyfWoP002Vv6X(Rps_CallFrame*callerframe, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x7f10ec24290f ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0x7f10ec2280cf __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7f10ec228188 __libc_start_main_impl ../csu/libc-start.c:360 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-13/README.Bugs> for instructions. make: *** [GNUmakefile:295: cmdrepl_rps.o] Error 1