bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Segmentation fault with Emacs mode


From: Juergen Sauermann
Subject: Re: [Bug-apl] Segmentation fault with Emacs mode
Date: Mon, 28 Apr 2014 17:06:27 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Hi,

I have initialized current_char in SVN 234, but can't see either how this would
make a difference. I would be interested in the workspace file as well if the error persists.

/// Jürgen


On 04/28/2014 06:04 AM, Elias Mårtenson wrote:
I've analysed the problem using Valgrind, and it seems as though this is a bug in the XML_Loading_Archive class. The only reason you saw it when enabling the Emacs mode was that the native plugin caused memory layout to be slightly different. Different enough that it triggered a crash instead of just random data.

That explains why you changing seemingly unrelated things changed the behaviour of the crash.

Here's the Valgrind error you get by simply loading your workspace in a plain APL session (i.e. no Emacs mode):

       )load /home/emartenson/Downloads/Devices.xml
==24490== Conditional jump or move depends on uninitialised value(s)
==24490==    at 0x47C452: XML_Loading_Archive::next_tag(char const*) (Archive.cc:1013)
==24490==    by 0x47BD6D: XML_Loading_Archive::reset() (Archive.cc:872)
==24490==    by 0x47BADA: XML_Loading_Archive::XML_Loading_Archive(char const*, int&) (Archive.cc:839)
==24490==    by 0x560394: Workspace::load_WS(std::ostream&, std::vector<UCS_string, std::allocator<UCS_string> > const&) (Workspace.cc:793)
==24490==    by 0x49B2CD: Command::process_line(UCS_string&) (Command.def:37)
==24490==    by 0x49AE63: Command::process_line() (Command.cc:63)
==24490==    by 0x55CA6B: Workspace::immediate_execution(bool) (Workspace.cc:129)
==24490==    by 0x4BCBCC: main (main.cc:466)
==24490== 

I took a look at the code, and I'm not entirely sure what's going on. The only conditional jumps that happen in the next_tag() method depends on current_char, which I presume could be uninitialised. I suppose Jürgen will have to take a look at this and determine how to fix this one.

Regards,
Elias


On 28 April 2014 11:57, Blake McBride <address@hidden> wrote:
Interestingly, from the console I loaded the WS, and cleared ⎕LX and the SI.  I still get the same problem in Emacs mode with that WS.  It doesn't seem to be related to ⎕LX like I thought.



On Sun, Apr 27, 2014 at 10:01 PM, Elias Mårtenson <address@hidden> wrote:
I see. I got the crash now. I'll look at the core.


On 28 April 2014 11:01, Blake McBride <address@hidden> wrote:
You are doing a copy.  I did a load.  No the same thing.


On Sun, Apr 27, 2014 at 9:54 PM, Elias Mårtenson <address@hidden> wrote:
It loads correctly on mine, latest version of GNU APL from Svn:

EMACS_NATIVE
      Network listener started. Connection information: mode:tcp addr:38324
      )copy /home/emartenson/Downloads/Devices.xml
SAVED 2014-4-27  16:11:45 (GMT-5)
      )fns
CAL     CS      EHN     EMACS_NATIVE    ER      JUL     Lck     Omega   
PI      Parse   Pin     VI      auto    ∆    

Regards,
Elias


On 28 April 2014 10:50, Blake McBride <address@hidden> wrote:
Here it is.  Thanks!


On Sun, Apr 27, 2014 at 9:49 PM, Elias Mårtenson <address@hidden> wrote:
Do you have a copy of the workspace I can test with?

Regards,
Elias


On 28 April 2014 10:48, Blake McBride <address@hidden> wrote:
I built ans installed libemacs.so from the native directory bu same problem.



On Sun, Apr 27, 2014 at 9:42 PM, Blake McBride <address@hidden> wrote:
Greetings,

I have a WS that has a ⎕LX to a valid function.  That function, in turn, calls another function that isn't there (on purpose).  

-----------------------------------------------------------------------------------------------

Here is what I get from the terminal:

      )load Devices
SAVED 2014-4-27  16:11:45 (GMT-5)
VALUE ERROR
auto[11]  start
          ^

-----------------------------------------------------------------------------------------------

Here is what I get in Emacs:

      EMACS_NATIVE
      Network listener started. Connection information: mode:tcp addr:33206
      )load Devices
SAVED 2014-4-27  16:11:45 (GMT-5)
VALUE ERROR
auto[11]  start
          ^


====================================================
SEGMENTATION FAULT

Process apl segmentation fault


-----------------------------------------------------------------------------------------------

I am running the latest APL & Emacs mode code.

Thanks.

Blake











reply via email to

[Prev in Thread] Current Thread [Next in Thread]