Project

General

Profile

Actions

Bug #2063

closed

Core dump on AIX

Added by pedz (Perry Smith) over 14 years ago. Updated about 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.1p243 (2009-07-16 revision 24175) [powerpc-aix5.3.0.0]
Backport:

Description

=begin
The aix_loaderror routine has many problems. First, if loadquery fails, messages has not been initialized. So the next if statement coredumps:

     for(i = 0; message[i] && *message[i]; i++) {

message[i] is set to trash and *message[i] can cause a SEGV.

Second, the messages returned are no long in the same format as the documentation. The easiest way to see this is to dump them out. They can optionally start with (xxx. Then there is the error code (as before), then what appears to be a count of parameters, followed by a list. The code below is valid for the case of a single undefined symbol.

The message text is placed inside the buffer which is passed as well as the pointers to the messages. So, it needs to be bigger than just the size of 8 pointers.

The code inside the for (j loop often uses i where it should use j.

All this just to get a message that is not printed out anyway which I feel should be changed but thats another matter.

I'm using ruby 1.9.1-p243, gcc 4.4.1, on AIX 5.3 gold.

diff is attached.
=end


Files

dln-diff (3.48 KB) dln-diff pedz (Perry Smith), 09/21/2009 12:32 AM
dln.diff (2.27 KB) dln.diff kanemoto (Yutaka Kanemoto), 04/29/2010 02:01 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0