1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 11:25:35 +02:00
Find a file
Oleg Krasilnikov 778c379f88 From: Davasam, Sunil K
Sent: Monday, August 28, 2006 9:57 PM
To: Treggiari, Leo; Sennikovsky, Mikhail
Cc: Monteleone, Robert; Davasam, Sunil K
Subject: Issue with CDT dwarf reader..



Hi,

            I found an issue with CDT dwarf reader. The method ‘read_unsigned_leb128()’ contains a bug. Due to this bug, if the control reaches to this method, it goes in infinite loop and Eclipse hangs.  This bug is exposed during the Intel Compiler integration testing into Eclipse/CDT. If the user tries to expand the debug binary (built by Intel Compiler) in ‘C/C++ Projects view’, Eclipse hangs. Even though I found this problem during the Intel Compiler integration testing, I think that the problem will appear when ever the control reaches this method.



According to DWARF standard, algorithm to decode an unsigned LEB128 number:

result = 0;

shift = 0;

size = number of bits in signed integer;

while(true)

{

byte = next byte in input;

result |= (low order 7 bits of byte << shift);

shift += 7;

/* sign bit of byte is second high order bit (0x40) */

if (high order bit of byte == 0)

break;

}



if ((shift <size) && (sign bit of byte is set))

/* sign extend */

result |= - (1 << shift);



--



            But in the implementation, it is reading the same bits again and again.  Here I attached a patch that fixes the problem. Please check in the patch to CDT. I hope you have permission to check in to cdt core package.



The method is defined in the following location.



Method:    read_unsigned_leb128

Line     :    213

File     :     utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java

Package:  org.eclipse.cdt.core



Thanks & Regards,

Sunil
2006-08-31 10:25:42 +00:00
build Fix for the 125571: wiredness in delta handling in GeneratedMakefileBuilder 2006-08-28 15:08:15 +00:00
core From: Davasam, Sunil K 2006-08-31 10:25:42 +00:00
debug Contribution from bug #154854 - GDB console - verbose console mode and save console content buttons 2006-08-31 07:26:28 +00:00
doc defect 144140 -- table of contents referenced missing pages. 2006-08-18 15:07:57 +00:00
launch/org.eclipse.cdt.launch Fix to bail out gracefully when projects are closed or gone 2006-08-23 17:53:18 +00:00
releng Fix the version of the test plugin since it hasn't changed yet. 2006-07-10 18:28:35 +00:00
xlc add copyright header 2006-07-31 11:42:31 +00:00