This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Created attachment 685 [details] Minimized test case When I try to load an invalid XHTML file, that uses <br> instead of <br/>, Amaya (compiled today from CVS) segfaults while trying to report the error: Program received signal SIGSEGV, Segmentation fault. 0x0816f62f in XmlParseError (type=errorNotWellFormed, msg=0xb7f99a14 "mismatched tag", line=4) at ../../amaya/Xml2thot.c:599 599 val = (unsigned char)(c[pos]); (gdb) bt #0 0x0816f62f in XmlParseError (type=errorNotWellFormed, msg=0xb7f99a14 "mismatched tag", line=4) at ../../amaya/Xml2thot.c:599 #1 0x0816fbee in XmlParse (infile=0xa94c280, charset=UTF_8, xmlDec=0xbfffadcb, xmlDoctype=0xbfffadca) at ../../amaya/Xml2thot.c:5929 #2 0x081757df in StartXmlParser (doc=1, fileName=0xa953298 "/home/magnus/.amaya/1/unclosed-br.xml", documentName=0x9d61870 "unclosed-br.xml", documentDirectory=0x9d62838 "/home/magnus/.amaya/1", pathURL=0xa952c48 "/tmp/unclosed-br.xml", withDec=true, withDoctype=false, useMath=false, externalDoc=false) at ../../amaya/Xml2thot.c:6089 #3 0x081480bf in LoadDocument (doc=1, pathname=0xa952c48 "/tmp/unclosed-br.xml", form_data=0x0, initial_url=0x9d5a6a0 "/tmp/unclosed-br.xml", method=8, tempfile=0xa952f70 "", documentname=0x9d61870 "unclosed-br.xml", http_headers=0x0, history=false, inNewWindow=0xbfffbb57, realdocname=0x0) at ../../amaya/init.c:3878 #4 0x0814842c in GetAmayaDoc_callback (newdoc=1, status=0, urlName=0x9d621e8 "/tmp/unclosed-br.xml", outputfile=0x9d61ec0 "", proxyName=0x0, http_headers=0x0, context=0x9d59a40) at ../../amaya/init.c:4811 #5 0x0814972a in GetAmayaDoc (urlname=0xbfffc648 "/tmp/unclosed-br.xml", form_data=0x0, doc=0, baseDoc=0, method=8, history=false, cbf=0, ctx_cbf=0x0) at ../../amaya/init.c:5331 #6 0x08149c31 in CallbackDialogue (ref=37310, typedata=1, data=0x1 <Address 0x1 out of bounds>) at ../../amaya/init.c:5610 #7 0x0814bc4f in OpenNewDocFromArgv (url=0x99c2738 "/tmp/unclosed-br.xml") at ../../amaya/init.c:7230 #8 0x0814e094 in InitAmaya (event=0xbfffce04) at ../../amaya/init.c:7138 #9 0x082f68d8 in CallAction (notifyEvent=0xbfffce04, event=TteInit, pre=false, type=0, element=0x0, schStruct=0x0, attr=false) at ../../thotlib/dialogue/callback.c:174 #10 0x082f6b7b in CallEventType (notifyEvent=0xbfffce04, pre=false) at ../../thotlib/dialogue/callback.c:335 #11 0x0830695d in TtaMainLoop () at ../../thotlib/dialogue/interface.c:174 #12 0x080d959c in amaya_main (argc=2, argv=0x99c2668) at EDITORAPP.c:1667 #13 0x082a2afb in AmayaApp::OnIdle (this=0x996f538, event=@0xbfffef18) at ../../thotlib/base/AmayaApp.cpp:463 #14 0xb744aaf1 in wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const () from /usr/lib/libwx_baseu-2.8.so.0 #15 0xb74e9d2a in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0 #16 0xb74eaf44 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/libwx_baseu-2.8.so.0 #17 0xb74eb04b in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0 #18 0xb77bd8d2 in wxAppBase::ProcessIdle() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #19 0xb770c8f3 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #20 0xb68e6a71 in ?? () from /usr/lib/libglib-2.0.so.0 #21 0xb68e89a8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #22 0xb68ec063 in ?? () from /usr/lib/libglib-2.0.so.0 #23 0xb68ec582 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #24 0xb6ce2239 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #25 0xb77264f5 in wxEventLoop::Run() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #26 0xb77bd6be in wxAppBase::MainLoop() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #27 0xb77bd291 in wxAppBase::OnRun() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #28 0xb74846ba in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-2.8.so.0 #29 0xb74848b7 in wxEntry(int&, char**) () from /usr/lib/libwx_baseu-2.8.so.0 #30 0x082a488b in main (argc=Cannot access memory at address 0x4 ) at ../../thotlib/base/AmayaApp.cpp:51
A test was added to prevent the crash
Please make my changes