Bus Error and Segmentation Fault when Heap Profiling is On

View: New views
2 Messages — Rating Filter:   Alert me  

Bus Error and Segmentation Fault when Heap Profiling is On

by Shin-Cheng Mu-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

This is another potential bug. Unfortunately I currently
cannot reproduce it on smaller programs. I tried to do
heap profiling on the following code:

    http://www.psdlab.org/~scm/hx.tar.gz

The main program is hxpc.hs. I tried to compile it with

    hmake -nhc98 -p hxpc

and run it on a small sample input

    scm$ cat > temp.xml
    <a><b><item>123</item></b><c></c></a>
    scm$ ./hxpc temp.xml
    Bus error
    scm$ ./hxpc temp.xml +RTS -p
    Segmentation fault

Increasing the heap size does not seem to help.

If I compile the program without the -p option, it runs fine.

Since Malcolm Wallace has already profiled the program
on his machine, it seems to be a platform specific problem
I installed NHC98 1.18_4 using Darwin Ports, on a PowerPC
G4 based Mac, running OS X 10.4 and GCC 4.0.

sincerely,
Shin-Cheng Mu
_______________________________________________
Nhc-bugs mailing list
Nhc-bugs@...
http://www.haskell.org/mailman/listinfo/nhc-bugs

Re: Bus Error and Segmentation Fault when Heap Profiling is On

by Malcolm.Wallace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Shin-Cheng Mu <scm@...> wrote:

>     scm$ cat > temp.xml
>     <a><b><item>123</item></b><c></c></a>
>     scm$ ./hxpc temp.xml
>     Bus error
>     scm$ ./hxpc temp.xml +RTS -p
>     Segmentation fault
>
> If I compile the program without the -p option, it runs fine.
>
> Since Malcolm Wallace has already profiled the program
> on his machine, it seems to be a platform specific problem

When I profiled your code previously, it worked fine on either a
Linux/x86 or Solaris/sparc machine (I don't remember which), but not on
MacOS/powerpc, so yes it does look like a platform-specific problem.
Strangely, although the profile was generated OK on the other platform,
the hp2graph tool for converting it to a graph seg faulted there, but
worked correctly on MacOS/powerpc.

Regards,
    Malcolm
_______________________________________________
Nhc-bugs mailing list
Nhc-bugs@...
http://www.haskell.org/mailman/listinfo/nhc-bugs
LightInTheBox - Buy quality products at wholesale price