Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007602OCamlmiscpublic2017-08-05 13:172017-08-05 15:00
ReporterRichard Jones 
Assigned Togasche 
Platformaarch64OSLinuxOS Version
Product Version4.05.0 
Target VersionFixed in Version 
Summary0007602: Test suite crashes on aarch64
DescriptionI'm running the test suite on aarch64 with the very latest gcc, glibc and binutils:


and it crashes in the test suite. For crash details, see below.

This worked before I upgraded those packages. I suspect either glibc or binutils are really to blame here and it may not be OCaml at all, so this is mainly a "heads up" that something is going on.

Reading symbols from /home/rjones/d/fedora-ocaml/testsuite/tests/lib-dynlink-native/main...done.
[New LWP 32284]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/".
Core was generated by `./main'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000ffff8954d0e4 in camlPlugin__entry ()
   from /home/rjones/d/fedora-ocaml/testsuite/tests/lib-dynlink-native/
(gdb) bt
#0 0x0000ffff8954d0e4 in camlPlugin__entry ()
   from /home/rjones/d/fedora-ocaml/testsuite/tests/lib-dynlink-native/
#1 0x00000000004bfe3c in caml_start_program ()
#2 0x00000000004bab64 in caml_callback (
    closure=closure@entry=281474943984712, arg=arg@entry=0) at callback.c:173
0000003 0x00000000004bf8ac in caml_natdynlink_run (handle_v=<optimized out>,
    symbol=<optimized out>) at natdynlink.c:141
0000004 0x00000000004bfdac in caml_c_call ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Dump of assembler code for function camlPlugin__entry:
   0x0000ffff8954d0d0 <+0>: sub sp, sp, #0x20
   0x0000ffff8954d0d4 <+4>: str x30, [sp, 0000024]
   0x0000ffff8954d0d8 <+8>: adrp x0, 0xffff8956c000
   0x0000ffff8954d0dc <+12>: add x0, x0, #0x2d8
   0x0000ffff8954d0e0 <+16>: adrp x16, 0xffff8954d000 <__do_global_dtors_aux+24>
=> 0x0000ffff8954d0e4 <+20>: str x0, [x16, 0000576]
   0x0000ffff8954d0e8 <+24>: adrp x1, 0xffff8956c000
   0x0000ffff8954d0ec <+28>: add x1, x1, #0x2c0
   0x0000ffff8954d0f0 <+32>: adrp x16, 0xffff8954d000 <__do_global_dtors_aux+24>

(gdb) info registers
x0 0xffff8956c2d8 281472985907928
x1 0xfffffe0ca418 281474943984664
x2 0x19958c20 429231136
x3 0x198fb010 428847120
x4 0x1 1
x5 0x0 0
x6 0x0 0
x7 0xffff90c144a1 281473110328481
x8 0xfffffe0ca520 281474943984928
x9 0x4bfe9c 4980380
x10 0x0 0
x11 0x19958128 429228328
x12 0xffff8954c2c0 281472985776832
x13 0x0 0
x14 0x17 23
x15 0xffff8954d0d0 281472985780432
x16 0xffff8954d000 281472985780224
x17 0x559000 5607424
x18 0x0 0
x19 0x199581b0 429228464
x20 0xffff89be2468 281472992683112
x21 0x557000 5599232
x22 0x0 0
x23 0xffff8954d1e0 281472985780704
x24 0xffff8954d038 281472985780280
x25 0xffff89be2ab8 281472992684728
x26 0xfffffe0ca2e0 281474943984352
x27 0xffff89be1fd0 281472992681936
x28 0xffff899f2000 281472990650368
x29 0xfffffe0ca310 281474943984400
x30 0x4bfe3c 4980284
sp 0xfffffe0ca2c0 0xfffffe0ca2c0
pc 0xffff8954d0e4 0xffff8954d0e4 <camlPlugin__entry+20>
cpsr 0x80000000 [ EL=0 N ]
fpsr 0x0 0
fpcr 0x0 0
Steps To ReproduceCompile ocaml and run the test suite from the build directory in the normal way.
TagsNo tags attached.
Attached Files

- Relationships
duplicate of 0007585resolvedshinwell OCaml 4.04, 4.05-rc1 incompatible with snapshot binutils, when built with -fPIC, results in crashes 

-  Notes
Richard Jones (reporter)
2017-08-05 13:20

I should say that everything works fine on all other architectures that we test (x86_64, ppc64, ppc64le). That's even with the latest binutils etc.
gasche (developer)
2017-08-05 15:00
edited on: 2017-08-05 15:00

Thanks for the detailed crash report. I believe (please complain if this is not the case!) that this is the same issue as 0007585, in which there is already ample discussion. See also a proposed patch in discussion: [^]

- Issue History
Date Modified Username Field Change
2017-08-05 13:17 Richard Jones New Issue
2017-08-05 13:20 Richard Jones Note Added: 0018159
2017-08-05 15:00 gasche Note Added: 0018160
2017-08-05 15:00 gasche Relationship added duplicate of 0007585
2017-08-05 15:00 gasche Status new => resolved
2017-08-05 15:00 gasche Resolution open => duplicate
2017-08-05 15:00 gasche Assigned To => gasche
2017-08-05 15:00 gasche Note Edited: 0018160 View Revisions

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker