0

what is the significance of all these different hexadecimal address (in bold) ? how to get exact problematic line number of source code for dumped function below from this hex address of crash dump stack for ios platform build specifically. I know add2line is used to get line number from hex address for linux platform.

==8587==ERROR: AddressSanitizer: heap-use-after-free on address 0x611000112680 at pc 0x000124c4c2e5 bp 0x700003c58130 sp 0x700003c58128
READ of size 8 at 0x611000112680 thread T32

#0 0x124c4c2e4 in fun1(param1,param2, param3)+0xac4 (TestApp:x86_64+0x122eba2e4)

#1 0x124c4d88a in fun2(param1)+0x29a (TestApp:x86_64+0x122ebb88a)

Law Kumar
  • 53
  • 1
  • 9

1 Answers1

0

what is the significance of all these different hexadecimal address

The first number (0x124c4c2e4) is the instruction address where the heap-use-after-free is detected.

The second number: 0xac4 says that address 0x124c4c2e4 is the same as & fun1()+0xac4, that is the bad access is happening inside fun1().

The last number tells you which binary the problem function is located in, and at what offset from where this binary is mapped.

IOW, we can deduce that &fun1() == 0x124c4c2e4 - 0xac4 == 0x124c4b820 and that the TestApp is mapped at 0x124c4c2e4 - 0x122eba2e4 == 0x1d92000.

how to get exact problematic line number of source code

You must compile your code with debug info. Note: addresses may change -- you need to re-build with -g and get a new report.

I know add2line is used to get line number from hex address for linux platform.

This answer might help.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362