Opened 15 months ago

Last modified 8 days ago

#7655 new bug

7.6.2 Segmentation Fault/Bus Error in large exponentation

Reported by: Doug310 Owned by:
Priority: normal Milestone: 7.8.3
Component: GHCi Version: 7.8.1-rc1
Keywords: exponentiation Cc: george.colpitts@…, hvr
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: GHCi crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Mac OS X 10.8.2. Haskell Platform 2012.4, 64-bit. GHCI 7.4.2.

Large exponentations cause bus errors or segmentation faults.

Examples:

~/src/haskell$ ghci
GHCi, version 7.4.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> 12345678901234567890 ^ 12345
Bus error: 10

~/src/haskell$ ghci
GHCi, version 7.4.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> 2384729837498237^23455
Segmentation fault: 11

Attachments (1)

exp.txt (15.5 KB) - added by George 2 months ago.
crash report for bus error

Download all attachments as: .zip

Change History (28)

comment:1 Changed 15 months ago by monoidal

  • Resolution set to fixed
  • Status changed from new to closed

This is fixed in GHC 7.6.1, according to http://www.reddit.com/r/haskell/comments/17jyw9/announce_ghc_version_762/c86g3ne

If you can reproduce the bug in 7.6, please reopen.

comment:2 Changed 15 months ago by Doug310

  • Resolution fixed deleted
  • Status changed from closed to new
  • Summary changed from 7.4.2 Segmentation Fault/Bus Error in large exponentation to 7.6.2 Segmentation Fault/Bus Error in large exponentation
  • Version changed from 7.4.2 to 7.6.2

Unfortunately, I am able to reproduce this partially in 7.6.2 for x86_64 using the available binary distribution: ghc-7.6.2-x86_64-apple-darwin.tar.bz2.

~/src/haskell/ghc/ghc-7.6.2$ ghci
GHCi, version 7.6.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> 12345678901234567890 ^ 12345
Bus error: 10

However, my second example works:

~/src/haskell/ghc/ghc-7.6.2$ ghci
GHCi, version 7.6.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> 2384729837498237 ^ 23455
6856427983194016568523 .... (goes on for hundreds of lines)

The full Bus Error crash report is:

Process:         ghc [27889]
Path:            /opt/ghc-7.6.2-x86_64/*/ghc
Identifier:      ghc
Version:         ???
Code Type:       X86-64 (Native)
Parent Process:  bash [24202]
User ID:         501

Date/Time:       2013-02-04 00:01:12.441 -0500
OS Version:      Mac OS X 10.8.2 (12C60)
Report Version:  10

Interval Since Last Report:          3611040 sec
Crashes Since Last Report:           696
Per-App Crashes Since Last Report:   7
Anonymous UUID:                      145798BC-982C-D5DB-8C3A-18EA16FAB47B

Crashed Thread:  1

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000011203c998

VM Regions Near 0x11203c998:
    MALLOC metadata        000000011203b000-000000011203c000 [    4K] r--/rwx SM=PRV  
--> Stack                  000000011203c000-000000011203d000 [    4K] ---/rwx SM=NUL  
    Stack                  000000011203d000-00000001120bf000 [  520K] rw-/rwx SM=COW  

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff8bbae0fa __psynch_cvwait + 10
1   libsystem_c.dylib             	0x00007fff93534f89 _pthread_cond_wait + 869
2   ghc                           	0x00000001100e16c9 waitCondition + 9
3   ghc                           	0x00000001100be8ab yieldCapability + 395
4   ghc                           	0x00000001100cd382 schedule + 386
5   ghc                           	0x00000001100cddf4 scheduleWaitThread + 164
6   ghc                           	0x00000001100c878e real_main + 68
7   ghc                           	0x00000001100c8896 hs_main + 93
8   ghc                           	0x000000010e0d44f9 main + 73
9   ghc                           	0x000000010e00dbb4 start + 52

Thread 1 Crashed:
0   ???                           	0x00000001129c3d3c 0 + 4607196476
1   ???                           	0x00000001129f44b3 0 + 4607394995
2   ???                           	0x00000001129dbbe4 0 + 4607294436
3   ???                           	0x00000001129f119c 0 + 4607381916
4   ???                           	0x00000001129cc8f2 0 + 4607232242
5   ???                           	0x00000001129c74fa 0 + 4607210746
6   ???                           	0x00000001129ab454 0 + 4607095892
7   ghc                           	0x00000001100f38c8 stg_marked_upd_frame_info_dsp + 16
8   ???                           	0x058d482177000000 0 + 400055250473451520

Thread 2:
0   libsystem_kernel.dylib        	0x00007fff8bbaed2a kevent64 + 10
1   ghc                           	0x000000011006c8f2 s52S_info + 170
2   ghc                           	0x000000011006ca48 s6qO_info_dsp + 24

Thread 3:
0   libsystem_kernel.dylib        	0x00007fff8bbae0fa __psynch_cvwait + 10
1   libsystem_c.dylib             	0x00007fff93534f89 _pthread_cond_wait + 869
2   ghc                           	0x00000001100e16c9 waitCondition + 9
3   ghc                           	0x00000001100be8ab yieldCapability + 395
4   ghc                           	0x00000001100cd382 schedule + 386
5   ghc                           	0x00000001100cdccb scheduleWorker + 27
6   libsystem_c.dylib             	0x00007fff93530742 _pthread_start + 327
7   libsystem_c.dylib             	0x00007fff9351d181 thread_start + 13

Thread 1 crashed with X86 Thread State (64-bit):
  rax: 0x00000000000a5771  rbx: 0x0000000000000560  rcx: 0x00000000ffffffeb  rdx: 0x00000000000000ac
  rdi: 0x000000011203c440  rsi: 0x0000000113b24680  rbp: 0x00000001120312c0  rsp: 0x0000000112031248
   r8: 0x000000000018192d   r9: 0x00000000000000a9  r10: 0xe7d24d796c78192d  r11: 0x41430d29ed17e85b
  r12: 0x0000000000000007  r13: 0x00000000000000a9  r14: 0x0000000000000003  r15: 0x00000000000000ac
  rip: 0x00000001129c3d3c  rfl: 0x0000000000010286  cr2: 0x000000011203c998
Logical CPU: 4

Binary Images:
       0x10e00d000 -        0x1101c0fe7 +ghc (???) <1010B9EB-C2AF-32E2-AD15-CEB7B26CA475> /opt/ghc-7.6.2-x86_64/*/ghc
    0x7fff6dc0d000 -     0x7fff6dc4193f  dyld (210.2.3) <A40597AA-5529-3337-8C09-D8A014EB1578> /usr/lib/dyld
    0x7fff8787a000 -     0x7fff87880fff  libmacho.dylib (829) <BF332AD9-E89F-387E-92A4-6E1AB74BD4D9> /usr/lib/system/libmacho.dylib
    0x7fff8797b000 -     0x7fff879c7ff7  libauto.dylib (185.1) <73CDC482-16E3-3FC7-9BB4-FBA2DA44DBC2> /usr/lib/libauto.dylib
    0x7fff87b21000 -     0x7fff87b29fff  liblaunch.dylib (442.26.2) <2F71CAF8-6524-329E-AC56-C506658B4C0C> /usr/lib/system/liblaunch.dylib
    0x7fff88aef000 -     0x7fff88af0ff7  libremovefile.dylib (23.1) <DBBFAF35-AC78-3856-92F6-6E4FD9DF14A2> /usr/lib/system/libremovefile.dylib
    0x7fff88db3000 -     0x7fff88dbbff7  libsystem_dnssd.dylib (379.32.1) <62AA0B84-188A-348B-8F9E-3E2DB08DB93C> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff89272000 -     0x7fff8927dfff  libsystem_notify.dylib (98.5) <C49275CC-835A-3207-AFBA-8C01374927B6> /usr/lib/system/libsystem_notify.dylib
    0x7fff8b590000 -     0x7fff8b5dfff7  libcorecrypto.dylib (106.2) <CE0C29A3-C420-339B-ADAA-52F4683233CC> /usr/lib/system/libcorecrypto.dylib
    0x7fff8b9fb000 -     0x7fff8ba29ff7  libsystem_m.dylib (3022.6) <B434BE5C-25AB-3EBD-BAA7-5304B34E3441> /usr/lib/system/libsystem_m.dylib
    0x7fff8bb9a000 -     0x7fff8bb9bfff  libsystem_blocks.dylib (59) <D92DCBC3-541C-37BD-AADE-ACC75A0C59C8> /usr/lib/system/libsystem_blocks.dylib
    0x7fff8bb9c000 -     0x7fff8bbb7ff7  libsystem_kernel.dylib (2050.18.24) <C0535565-35D1-31A7-A744-63D9F10F12A4> /usr/lib/system/libsystem_kernel.dylib
    0x7fff8c182000 -     0x7fff8c185ff7  libdyld.dylib (210.2.3) <F59367C9-C110-382B-A695-9035A6DD387E> /usr/lib/system/libdyld.dylib
    0x7fff8d57f000 -     0x7fff8d580ff7  libSystem.B.dylib (169.3) <365477AB-D641-389D-B8F4-A1FAE9657EEE> /usr/lib/libSystem.B.dylib
    0x7fff8e231000 -     0x7fff8e236fff  libcache.dylib (57) <65187C6E-3FBF-3EB8-A1AA-389445E2984D> /usr/lib/system/libcache.dylib
    0x7fff8e237000 -     0x7fff8e26dfff  libsystem_info.dylib (406.17) <4FFCA242-7F04-365F-87A6-D4EFB89503C1> /usr/lib/system/libsystem_info.dylib
    0x7fff8e35d000 -     0x7fff8e452fff  libiconv.2.dylib (34) <FEE8B996-EB44-37FA-B96E-D379664DEFE1> /usr/lib/libiconv.2.dylib
    0x7fff8f2de000 -     0x7fff8f2e4ff7  libunwind.dylib (35.1) <21703D36-2DAB-3D8B-8442-EAAB23C060D3> /usr/lib/system/libunwind.dylib
    0x7fff8f8de000 -     0x7fff8f9f692f  libobjc.A.dylib (532.2) <90D31928-F48D-3E37-874F-220A51FD9E37> /usr/lib/libobjc.A.dylib
    0x7fff910e4000 -     0x7fff9114cff7  libc++.1.dylib (65.1) <20E31B90-19B9-3C2A-A9EB-474E08F9FE05> /usr/lib/libc++.1.dylib
    0x7fff9114d000 -     0x7fff9114fff7  libunc.dylib (25) <92805328-CD36-34FF-9436-571AB0485072> /usr/lib/system/libunc.dylib
    0x7fff91818000 -     0x7fff91819ff7  libdnsinfo.dylib (453.18) <E7595861-ECF9-336E-9901-BED2620FAA80> /usr/lib/system/libdnsinfo.dylib
    0x7fff91a6c000 -     0x7fff91a81ff7  libdispatch.dylib (228.23) <D26996BF-FC57-39EB-8829-F63585561E09> /usr/lib/system/libdispatch.dylib
    0x7fff91a84000 -     0x7fff91a8bfff  libcopyfile.dylib (89) <876573D0-E907-3566-A108-577EAD1B6182> /usr/lib/system/libcopyfile.dylib
    0x7fff92190000 -     0x7fff921b5ff7  libc++abi.dylib (24.4) <E7BD9363-1D25-3551-A68A-2E2FF6ABECD7> /usr/lib/libc++abi.dylib
    0x7fff92b1b000 -     0x7fff92b3dff7  libxpc.dylib (140.41) <FAC04D8B-680E-325F-8F0C-DD69859D0E01> /usr/lib/system/libxpc.dylib
    0x7fff92ce4000 -     0x7fff92ce4fff  libkeymgr.dylib (25) <CC9E3394-BE16-397F-926B-E579B60EE429> /usr/lib/system/libkeymgr.dylib
    0x7fff92ce6000 -     0x7fff92ce7ff7  libsystem_sandbox.dylib (220) <3C3B03CF-C525-3CB3-8557-62E91B93AC95> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff92ce8000 -     0x7fff92cedfff  libcompiler_rt.dylib (30) <08F8731D-5961-39F1-AD00-4590321D24A9> /usr/lib/system/libcompiler_rt.dylib
    0x7fff933e2000 -     0x7fff933f0ff7  libsystem_network.dylib (77.10) <0D99F24E-56FE-380F-B81B-4A4C630EE587> /usr/lib/system/libsystem_network.dylib
    0x7fff934e3000 -     0x7fff9351bfff  libncurses.5.4.dylib (37.3) <68D5B5F5-8252-3F1E-AFF1-C6AFE145DBC1> /usr/lib/libncurses.5.4.dylib
    0x7fff9351c000 -     0x7fff935e8fe7  libsystem_c.dylib (825.25) <8CBCF9B9-EBB7-365E-A3FF-2F3850763C6B> /usr/lib/system/libsystem_c.dylib
    0x7fff93c5c000 -     0x7fff93c5efff  libquarantine.dylib (52) <4BE2E642-A14F-340A-B482-5BD2AEFD9C24> /usr/lib/system/libquarantine.dylib
    0x7fff93c61000 -     0x7fff93c6ffff  libcommonCrypto.dylib (60026) <2D6537F5-1B5E-305C-A1CF-D1FA80CA3939> /usr/lib/system/libcommonCrypto.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 10900
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=120.4M resident=226.4M(188%) swapped_out_or_unallocated=16777216.0T(14611640221696%)
Writable regions: Total=70.3M written=22.0M(31%) resident=25.2M(36%) swapped_out=0K(0%) unallocated=45.2M(64%)
 
REGION TYPE                      VIRTUAL
===========                      =======
MALLOC                             36.4M
MALLOC guard page                    16K
STACK GUARD                        56.0M
Stack                              9756K
VM_ALLOCATE                        21.7M
__DATA                             3244K
__LINKEDIT                         81.0M
__TEXT                             39.4M
mapped file                        11.6M
shared memory                        12K
===========                      =======
TOTAL                             258.8M

Model: MacBookPro8,2, BootROM MBP81.0047.B27, 4 processors, Intel Core i7, 2.3 GHz, 16 GB, SMC 1.69f3
Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 512 MB
Graphics: AMD Radeon HD 6750M, AMD Radeon HD 6750M, PCIe, 1024 MB
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1333 MHz, 0x0000, 0x000000000000000000000000000000000000
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1333 MHz, 0x0000, 0x000000000000000000000000000000000000
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom BCM43xx 1.0 (5.106.98.81.22)
Bluetooth: Version 4.0.9f33 10885, 2 service, 18 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
Network Service: Logitech Harmony USB (en2), Ethernet, en2
Serial ATA Device: OCZ-VERTEX3, 480.1 GB
Serial ATA Device: Hitachi HTS725050A9A362, 500.11 GB
USB Device: hub_device, 0x0424  (SMSC), 0x2513, 0xfa100000 / 3
USB Device: iPad, apple_vendor_id, 0x12ab, 0xfa130000 / 6
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0245, 0xfa120000 / 5
USB Device: BRCM2070 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 4
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x821a, 0xfa113000 / 8
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8509, 0xfa200000 / 2
USB Device: hub_device, 0x0424  (SMSC), 0x2513, 0xfd100000 / 2
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd110000 / 3

comment:3 Changed 15 months ago by Doug310

I downloaded the i386 Mac OS X binary of 7.6.2 and tested both these exponentiations, and one more (with another digit in the exponent just for good measure). They all worked fine.

comment:4 Changed 12 months ago by igloo

  • Difficulty set to Unknown
  • Milestone set to 7.8.1
  • Owner set to igloo

Thanks for the report. I'll see if I can reproduce the problem.

comment:5 Changed 9 months ago by igloo

I can reproduce it with ghc-7.6.2-x86_64-apple-darwin.tar.bz2.

comment:6 Changed 9 months ago by igloo

And also with a validated HEAD (with dynamic ghci).

comment:7 Changed 9 months ago by igloo

Argh, now I can't reproduce it at all.

comment:8 Changed 9 months ago by igloo

  • Owner igloo deleted

comment:9 Changed 7 months ago by george.colpitts

I can reproduce the first, 12345678901234567890 ^ 12345, the bus error, on 10.8.4 with ghc 7.6.3, i.e. the Haskell platform.

I can't reproduce the second, 2384729837498237^23455, the second, the segmentation violation.

Last edited 7 months ago by george.colpitts (previous) (diff)

comment:10 Changed 7 months ago by george.colpitts

  • Keywords exponentiation added

comment:11 Changed 7 months ago by george.colpitts

  • Cc george.colpitts@… added

comment:12 Changed 2 months ago by George

  • Cc hvr added

same results in 7.8 RC1 on Mac OS 10.9.1 as my results above

comment:13 Changed 2 months ago by George

  • Version changed from 7.6.2 to 7.8.1-rc1

comment:14 Changed 2 months ago by carter

GHCI in my 7.8 RC build has no errors with either example. (ie I get a very very large number printed out)

comment:15 Changed 2 months ago by carter

my ghc build is a bindist here https://github.com/cartazio/ghc/releases/tag/carters-build-7.8-preRC1 from commit 12853f4dd3950b7bf9241f7394cc2f40d0b90c9a

it may be related to that.
heres my settings file

carter ~ » ghc --info
 [("Project name","The Glorious Glasgow Haskell Compilation System")
 ,("GCC extra via C opts"," -fwrapv")
 ,("C compiler command","gcc-4.8")
 ,("C compiler flags"," -m64 -fno-stack-protector")
 ,("C compiler link flags"," -m64")
 ,("ld command","/usr/bin/ld")
 ,("ld flags"," -arch x86_64")
 ,("ld supports compact unwind","YES")
 ,("ld supports build-id","NO")
 ,("ld supports filelist","YES")
 ,("ld is GNU ld","NO")
 ,("ar command","/usr/bin/ar")
 ,("ar flags","clqs")
 ,("ar supports at file","NO")
 ,("touch command","touch")
 ,("dllwrap command","/bin/false")
 ,("windres command","/bin/false")
 ,("libtool command","libtool")
 ,("perl command","/usr/bin/perl")
 ,("target os","OSDarwin")
 ,("target arch","ArchX86_64")
 ,("target word size","8")
 ,("target has GNU nonexec stack","False")
 ,("target has .ident directive","True")
 ,("target has subsections via symbols","True")
 ,("Unregisterised","NO")
 ,("LLVM llc command","/usr/local/bin/llc-3.4")
 ,("LLVM opt command","/usr/local/bin/opt-3.4")
 ,("Project version","7.8.20140130")
 ,("Booter version","7.6.3")
 ,("Stage","2")
 ,("Build platform","x86_64-apple-darwin")
 ,("Host platform","x86_64-apple-darwin")
 ,("Target platform","x86_64-apple-darwin")
 ,("Have interpreter","YES")
 ,("Object splitting supported","YES")
 ,("Have native code generator","YES")
 ,("Support SMP","YES")
 ,("Tables next to code","YES")
 ,("RTS ways","l debug thr thr_debug thr_l  dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn")
 ,("Support dynamic-too","YES")
 ,("Support parallel --make","YES")
 ,("Dynamic by default","NO")
 ,("GHC Dynamic","YES")
 ,("Leading underscore","YES")
 ,("Debug on","False")
 ,("LibDir","/usr/local/lib/ghc-7.8.20140130")
 ,("Global Package DB","/usr/local/lib/ghc-7.8.20140130/package.conf.d")
 ]

comment:16 Changed 2 months ago by rwbarton

George, thanks for following up on this. Could you attach a crash report for the bus error like the one Doug310 posted above? (or Austin, if you can reproduce this also?)

comment:17 Changed 2 months ago by Doug310

Thanks for attempting to address this. It's nice to see some traction after a year. :) It would be great if the 64-bit GHC/GHCi would become as stable as the 32-bit on Mac OS X.

comment:18 Changed 2 months ago by Doug310

Also note that I just tried various random large numbers after I first noticed the problem. It crashed on some, but not all, which made the underlying reason for the issue mystifying.

comment:19 Changed 2 months ago by hvr

btw, note that (^) for Integer is implemented via square-and-multiply, c.f. implementation in base.
So it might be interesting if one could find out which one of the several Integer-primop calls involved causes the actual fault.

Changed 2 months ago by George

crash report for bus error

comment:20 Changed 2 months ago by George

output from ghc --info corresponding to crash report for bus error above

 ghc --info
 [("Project name","The Glorious Glasgow Haskell Compilation System")
 ,("GCC extra via C opts"," -fwrapv")
 ,("C compiler command","/usr/local/bin/gcc")
 ,("C compiler flags"," -m64 -fno-stack-protector")
 ,("C compiler link flags"," -m64")
 ,("ld command","/usr/bin/ld")
 ,("ld flags"," -arch x86_64")
 ,("ld supports compact unwind","YES")
 ,("ld supports build-id","NO")
 ,("ld supports filelist","YES")
 ,("ld is GNU ld","NO")
 ,("ar command","/usr/bin/ar")
 ,("ar flags","clqs")
 ,("ar supports at file","@ArSupportsAtFile@")
 ,("touch command","touch")
 ,("dllwrap command","/bin/false")
 ,("windres command","/bin/false")
 ,("libtool command","libtool")
 ,("perl command","/usr/bin/perl")
 ,("target os","OSDarwin")
 ,("target arch","ArchX86_64")
 ,("target word size","8")
 ,("target has GNU nonexec stack","False")
 ,("target has .ident directive","True")
 ,("target has subsections via symbols","True")
 ,("Unregisterised","NO")
 ,("LLVM llc command","llc")
 ,("LLVM opt command","opt")
 ,("Project version","7.8.20140130")
 ,("Booter version","7.6.3")
 ,("Stage","2")
 ,("Build platform","x86_64-apple-darwin")
 ,("Host platform","x86_64-apple-darwin")
 ,("Target platform","x86_64-apple-darwin")
 ,("Have interpreter","YES")
 ,("Object splitting supported","YES")
 ,("Have native code generator","YES")
 ,("Support SMP","YES")
 ,("Tables next to code","YES")
 ,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn")
 ,("Support dynamic-too","YES")
 ,("Support parallel --make","YES")
 ,("Dynamic by default","NO")
 ,("GHC Dynamic","YES")
 ,("Leading underscore","YES")
 ,("Debug on","False")
 ,("LibDir","/usr/local/lib/ghc-7.8.20140130")
 ,("Global Package DB","/usr/local/lib/ghc-7.8.20140130/package.conf.d")
 ]

comment:21 Changed 2 months ago by carter

hrm ("ar supports at file","@ArSupportsAtFile?@")

could that be problematic?

comment:22 Changed 2 months ago by George

No idea but as we seem to have different versions of ar I assuming that we are on different versions of Mac OS or Xcode. I am on OS 10.9.1 and Xcode 5.0.2.

ls -l /usr/bin/ar
-rwxr-xr-x  1 root  wheel  14224 Oct 27 17:59 /usr/bin/ar

comment:23 Changed 2 months ago by carter

I'll add more of my system information shortly (just got off a plane. ). But the biggest difference is I'm using a real GCC. AND my build of ghc was built with it. Your GCC is actually clang.

I'm on a very up to date OS X 10.9 machine too. I'll confirm that shortly though.

The fact that you have something like @ArSupportsAtFile?@ being passed to AR makes me think that the build of ghc went wrong. OR perhaps there's a problem with how clang works as an assembler on OS X?

ILL do a clang build of the RC myself to try to replicate this.

comment:24 Changed 2 months ago by carter

Crazy theory: what version of the gmp dylib do you have? I'm pretty sure I'm using s recent gmp built via brew. Could it be that you're using the apple libgmp dylib and you're tripping a bug there?

comment:25 Changed 2 months ago by thoughtpolice

  • Milestone changed from 7.8.1 to 7.8.2

comment:26 Changed 3 weeks ago by George

I can no longer reproduce this using 7.8rc2. I believe I am using a real gcc and perhaps was before.

gcc --version

gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

bash-3.2$

ghc --info
[("Project name","The Glorious Glasgow Haskell Compilation System")
,("GCC extra via C opts"," -fwrapv")
,("C compiler command","/usr/local/bin/gcc")
,("C compiler flags"," -m64 -fno-stack-protector")
,("C compiler link flags"," -m64")
,("ld command","/usr/bin/ld")
,("ld flags"," -arch x86_64")
,("ld supports compact unwind","YES")
,("ld supports build-id","NO")
,("ld supports filelist","YES")
,("ld is GNU ld","NO")
,("ar command","/usr/bin/ar")
,("ar flags","clqs")
,("ar supports at file","NO")
,("touch command","touch")
,("dllwrap command","/bin/false")
,("windres command","/bin/false")
,("libtool command","libtool")
,("perl command","/usr/bin/perl")
,("target os","OSDarwin")
,("target arch","ArchX86_64")
,("target word size","8")
,("target has GNU nonexec stack","False")
,("target has .ident directive","True")
,("target has subsections via symbols","True")
,("Unregisterised","NO")
,("LLVM llc command","llc")
,("LLVM opt command","opt")
,("Project version","7.8.0.20140228")
,("Booter version","7.6.3")
,("Stage","2")
,("Build platform","x86_64-apple-darwin")
,("Host platform","x86_64-apple-darwin")
,("Target platform","x86_64-apple-darwin")
,("Have interpreter","YES")
,("Object splitting supported","YES")
,("Have native code generator","YES")
,("Support SMP","YES")
,("Tables next to code","YES")
,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn")
,("Support dynamic-too","YES")
,("Support parallel --make","YES")
,("Dynamic by default","NO")
,("GHC Dynamic","YES")
,("Leading underscore","YES")
,("Debug on","False")
,("LibDir?","/usr/local/lib/ghc-7.8.0.20140228")
,("Global Package DB","/usr/local/lib/ghc-7.8.0.20140228/package.conf.d")
]

comment:27 Changed 8 days ago by thoughtpolice

  • Milestone changed from 7.8.2 to 7.8.3
Note: See TracTickets for help on using tickets.