Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920345 - app-editors/xemacs-21.5.35 fails to compile on sparc: update-elc-2 crashes with SIGBUS
Summary: app-editors/xemacs-21.5.35 fails to compile on sparc: update-elc-2 crashes wi...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: Normal normal (vote)
Assignee: XEmacs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: unaligned-access 912595
  Show dependency tree
 
Reported: 2023-12-20 02:30 UTC by matoro
Modified: 2023-12-21 15:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (file_920345.txt,393.80 KB, text/plain)
2023-12-20 02:30 UTC, matoro
Details
terrible UBSAN run from hell (file_920345.txt,764.95 KB, text/plain)
2023-12-20 03:03 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2023-12-20 02:30:16 UTC
build.log and emerge --info in attachment.  Working on backtrace/UBSAN run.

Reproducible: Always
Comment 1 matoro archtester 2023-12-20 02:30:53 UTC
Created attachment 880020 [details]
build.log and emerge --info
Comment 2 matoro archtester 2023-12-20 02:58:08 UTC
(gdb) bt full
#0  0x000000000027c86c in pdump_reloc_one (data=0xdb5fd4 <dumped_data+6942356>, delta=7438336, desc=0x6f9070 <coding_system_description>)
    at dumper.c:1100
        ptr = 6847584
        desc1 = 0x6f9070 <coding_system_description>
        rdata = 0xdb5fe4 <dumped_data+6942372>
        pos = 0
#1  0x0000000000280204 in pdump_load_finish () at dumper.c:1897
        reloc = 0xe7b720 <dumped_data+7751136>
        rt = {desc = 0x6f9070 <coding_system_description>, count = 592}
        i = 71
        p = 0xe7b720 <dumped_data+7751136> ""
        delta = 7438336
        count = 2
        header = 0x718000 <dumped_data+3776>
#2  0x0000000000280aa8 in pdump_load (argv0=0x7feffc77617 "./xemacs") at dumper.c:2194
        exe_path = 0x0
        w = 0x0
        dir = 0x658257ea <error: Cannot access memory at address 0x658257ea>
        p = 0x16dcc4dc <error: Cannot access memory at address 0x16dcc4dc>
#3  0x0000000000231f64 in xemacs_21_5_b35_sparc64_unknown_linux (argc=10, argv=0x7feffc773b8, unused_envp=0x0, restart=0) at emacs.c:1345
        inhibit_early_packages_save = 1
        inhibit_autoloads_save = 1
        inhibit_all_packages_save = 1
        vanilla_inhibiting_save = 1
        debug_paths_save = 0
        inhibit_site_lisp_save = 0
        inhibit_site_modules_save = 0
        stack_bottom_variable = 0 '\000'
        skip_args = 4
        load_me = 8791794346289
#4  0x0000000000234018 in main (argc=10, argv=0x7feffc773b8, unused_envp=0x7feffc77410) at emacs.c:3135
        vol_argc = 10
        vol_argv = 0x7feffc773b8
        restarted = 0
(gdb) l
1095            case XD_OPAQUE_DATA_PTR:
1096            case XD_ASCII_STRING:
1097            case XD_BLOCK_PTR:
1098            case XD_LO_LINK:
1099              {
1100                EMACS_INT ptr = *(EMACS_INT *)rdata;
1101                if (ptr)
1102                  *(EMACS_INT *)rdata = ptr+delta;
1103                break;
1104              }
Comment 3 matoro archtester 2023-12-20 03:02:04 UTC
UBSAN picks this up but it also picks up a million other UB instances all over the place apparently.

make[2]: Leaving directory '/var/tmp/portage/app-editors/xemacs-21.5.35/work/xemacs-21.5.35/src'
./xemacs -no-packages -no-configured-paths -batch -no-autoloads -l update-elc-2.el -f batch-update-elc-2 ../lisp
dumper.c:1100:16: runtime error: load of misaligned address 0x00001137501c for type 'long int', which requires 8 byte alignment
0x00001137501c: note: pointer points here
  00 00 00 00 e0 7e 68 00  00 00 00 00 78 6b 4f 00  00 00 00 00 70 70 1a 00  00 00 00 00 50 70 1a 00
              ^
Comment 4 matoro archtester 2023-12-20 03:03:19 UTC
Created attachment 880022 [details]
terrible UBSAN run from hell
Comment 5 Mats Lidell gentoo-dev 2023-12-21 15:21:23 UTC
Thanks for the report. Upstream has been contacted and is looking into this.