xx@raspberrypi:~/crc32 $ cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : BCM2835
Revision : a01041
Model : Raspberry Pi 2 Model B Rev 1.1
xx@raspberrypi:~/crc32 $ make
g++ -O3 -Wall -Wextra -pedantic -s -c Crc32.cpp -o Crc32.o
g++ -O3 -Wall -Wextra -pedantic -s -c Crc32Test.cpp -o Crc32Test.o
g++ Crc32.o Crc32Test.o -O3 -Wall -Wextra -pedantic -s -lrt -o Crc32Test
xx@raspberrypi:~/crc32 $ ./Crc32Test
Please wait ...
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted
xx@raspberrypi:~/crc32 $ gdb Crc32Test
GNU gdb (Raspbian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from Crc32Test...
(No debugging symbols found in Crc32Test)
(gdb) run
Starting program: /home/jb/crc32/Crc32Test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Please wait ...
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=1996292672, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44 pthread_kill.c: No such file or directory.
(gdb) where
#0 __pthread_kill_implementation (threadid=1996292672, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x76c93a7c in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x76c4bcfc in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x76c350a0 in __GI_abort () at abort.c:79
#4 0x76e534b0 in __gnu_cxx::__verbose_terminate_handler() () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#5 0x76e50fec in ?? () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#6 0x76e51078 in std::terminate() () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#7 0x76e513d0 in __cxa_throw () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#8 0x76e51a68 in operator new(unsigned int) () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#9 0x0001052c in ?? ()
#10 0x76c353c0 in __libc_start_call_main (main=0x76c353c0 <__libc_start_call_main+140>, main@entry=0x10510, argc=1993887744, argc@entry=1, argv=0x10510,
argv@entry=0x7efff544) at ../sysdeps/nptl/libc_start_call_main.h:58
#11 0x76c354c8 in __libc_start_main_impl (main=0x10510, argc=1, argv=0x7efff544, init=<optimized out>, fini=0x0, rtld_fini=0x76fdb310 <_dl_fini>, stack_end=0x7efff544)
at libc-start.c:360
#12 0x00010b64 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)