You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vclog works fine with -O1 but gives a bus error with -O2.
If I can trust the backtrace it looks like gcc turned the
copy-loop into a memcpy call...
Program received signal SIGBUS, Bus error.
__memcpy_generic () at ../sysdeps/aarch64/multiarch/../memcpy.S:96
96 ldr A_l, [src]
(gdb) where
src=0x7fb6dc4164 "\247\200 \001",
src@entry=0x1 <error: Cannot access memory at address 0x1>, n=376432, n@entry=376444)
at /home/hias/libreelec/libreelec-master/build.LibreELEC-RPi4.aarch64-12.0-devel/build/bcm2835-utils-a843bed/vclog/vcdbg.c:731
at /home/hias/libreelec/libreelec-master/build.LibreELEC-RPi4.aarch64-12.0-devel/build/bcm2835-utils-a843bed/vclog/vcdbg.c:267
(gdb) up
src=0x7fb6dc4164 "\247\200 \001",
src@entry=0x1 <error: Cannot access memory at address 0x1>, n=376432, n@entry=376444)
at /home/hias/libreelec/libreelec-master/build.LibreELEC-RPi4.aarch64-12.0-devel/build/bcm2835-utils-a843bed/vclog/vcdbg.c:731
731 *dest = *src++;
(gdb) list
726 // Manually copy bytes before first boundary
727 size_t bytes_to_manually_copy =
728 n < bytes_until_boundary ? n : bytes_until_boundary;
729 n -= bytes_to_manually_copy;
730 while (bytes_to_manually_copy--) {
731 *dest = *src++;
732 dest++;
733 }
734
735 // return if we copied all of n
(gdb) p bytes_to_manually_copy
$1 = 11
(gdb) p src
$2 = 0x7fb6dc4164 "\247\200 \001"
0 commit comments