[mercury-users] my problems with parsing.mkEncoding
Tudor Holton
taholt at csse.unimelb.edu.au
Tue Nov 1 15:51:18 AEDT 2005
Hello,
I've been used to have some code working with the xml extras library.
Suddenly a few weeks ago it stopped working.
I've managed to track down what I think it could be, a problem with
mkEncoding. I've cut down my code to the following:
test.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:- module test.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
:- import_module list, string, char.
:- import_module parsing, xml, xml.doc, xml.dtd, xml.encoding, tree234,
list, string.
main(!IO) :-
Encoding = mkEncoding(xml.encoding.utf8),
io.write(Encoding,!IO).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This code compiles, yet when I run it I get the following error:
*** Mercury runtime: caught segmentation violation ***
cause: address not mapped to object
address involved: 226684
This may have been caused by a stack overflow, due to unbounded recursion.
exiting from signal handler
And when I run mdb:
[taholt at lister] 20051026.tmp [1:94] ./mdb ./test
Melbourne Mercury Debugger, mdb version rotd-2005-09-16.
Copyright 1998-2005 The University of Melbourne, Australia.
mdb is free software, covered by the GNU General Public License.
There is absolutely no warranty for mdb.
1: 1 1 CALL pred test.main/2-0 (det) test.m:8
mdb>
2: 2 2 CALL func parsing.mkEncoding/1-0 (det) parsing.m:259
(test.m:9)
*** Mercury runtime: caught segmentation violation ***
cause: address not mapped to object
address involved: 226684
Last trace event was event #2.
This may have been caused by a stack overflow, due to unbounded recursion.
exiting from signal handler
[taholt at lister] 20051026.tmp [1:95]
I'm running mercury on the csse.unimelb student machines.
mmc --version yields:
Mercury Compiler, version rotd-2005-09-16, configured for i386-pc-solaris2.8
Copyright (C) 1993-2005 The University of Melbourne
And I have compiled and linked the xml library from the 20051023 extras snapshot.
Maybe something has changed that I've missed?
Your help is appreciated.
Cheers,
Tudor.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list