7178741: SA: jstack -m produce UnalignedAddressException in output (Linux)

Reviewed-by: poonam, sla
This commit is contained in:
Kevin Walls 2013-02-27 22:40:14 +00:00
parent 84144898c1
commit 37cdc7b1f8
2 changed files with 12 additions and 2 deletions

View File

@ -60,8 +60,13 @@ final public class LinuxAMD64CFrame extends BasicCFrame {
return null;
}
// Check alignment of rbp
if ( dbg.getAddressValue(rbp) % ADDRESS_SIZE != 0) {
return null;
}
Address nextRBP = rbp.getAddressAt( 0 * ADDRESS_SIZE);
if (nextRBP == null) {
if (nextRBP == null || nextRBP.lessThanOrEqual(rbp)) {
return null;
}
Address nextPC = rbp.getAddressAt( 1 * ADDRESS_SIZE);

View File

@ -61,8 +61,13 @@ final public class LinuxX86CFrame extends BasicCFrame {
return null;
}
// Check alignment of ebp
if ( dbg.getAddressValue(ebp) % ADDRESS_SIZE != 0) {
return null;
}
Address nextEBP = ebp.getAddressAt( 0 * ADDRESS_SIZE);
if (nextEBP == null) {
if (nextEBP == null || nextEBP.lessThanOrEqual(ebp)) {
return null;
}
Address nextPC = ebp.getAddressAt( 1 * ADDRESS_SIZE);