[Haskell-cafe] MD5 performance optimizations,
and GHC -via-C producing segfaulting binary
Salvatore Insalaco
kirby81 at gmail.com
Tue May 20 16:12:08 EDT 2008
2008/5/20 Don Stewart <dons at galois.com>:
>>
>> Probably compiling with -fvia-C could help even more, but strangely:
>>
>> [roxas:~/Desktop/test2/MyMD5] kirby% ghc -fvia-C -funbox-strict-fields
>> -O2 --make md5sum.hs
>> [roxas:~/Desktop/test2/MyMD5] kirby% time ./md5sum ../../jboss-4.2.2.GA.zip
>> Segmentation fault
>>
>> Is this supposed to happen? There're no "unsafe" functions or imports
>> used in the program. Maybe a bug in GHC?
>
> That could be a gcc bug, in fact. Can you provide the final source?
> Does changing the gcc optimisation level help? (i.e. -fvia-C -optc-O2 )
I tried with and without gcc optimizations, but it always segfaults.
It happened to me even before my optimizations.
I've got GHC 6.8.2 on Mac OS X 10.5.2, GCC 4.0.1. -fvia-C works well
for other libraries and applications, so I don't think it's a problem
of my specific setting.
Salvatore
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MyMD5.tar.gz
Type: application/x-gzip
Size: 2471 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080520/ac4a29e6/MyMD5.tar.bin
More information about the Haskell-Cafe
mailing list