Search code examples
ccompilationintel-pin

Intel Pin tools 32-bit - ProcessSectionHeaders: 560: assertion failed


I'm trying to run the ManualExamples of the latest Pin tool from Intel (3.7-97619) on Kali 32-bit (Linux kali32 4.19.0-kali4-686-pae #1 SMP Debian 4.19.28-2kali1 (2019-03-18) i686 GNU/Linux).

I could compile the examples found in source/tools/ManualExamples using make TARGET=ia32, but as soon as I run an example with the command ../../../pin -t obj-ia32/isampling.so -- /bin/ls from the ManualExamples as suggested in the documentation. Nonetheless, I face the following issue:

A: Source/pin/elfio/img_elf.cpp: ProcessSectionHeaders: 560: assertion failed: SEC_vaddr_i(sec) >= IMG_seg_text_vaddr_i(img) && SEC_vaddr_i(sec) < IMG_seg_data_vaddr_i(img)

################################################################################
## STACK TRACE
################################################################################
??? at isampling.so+0x24472 

??? at isampling.so+0x90946 

??? at isampling.so+0x98671 

??? at isampling.so+0x14654d 

??? at isampling.so+0x148b9d 

??? at isampling.so+0x148c50 

??? at isampling.so+0x6f243 

??? at isampling.so+0x4bfab 

_ZN14LEVEL_INJECTOR13UNIX_INJECTEE12StartProgramEb+0x10f at /root/pin/ia32/bin/pinbin+0x3354af 

??? at isampling.so+0x48889 

main+0x97 at isampling.so+0x90d7 

_ZN14LEVEL_INJECTOR13UNIX_INJECTEE9StartToolEv+0x1d2 at /root/pin/ia32/bin/pinbin+0x333f12 

_ZN14LEVEL_INJECTOR13UNIX_INJECTEE29RunMainThreadOnPinStackAttachEPS0_+0x3de at /root/pin/ia32/bin/pinbin+0x3374ee 

Pin: pin-3.7-97619-0d0c92f4f
Copyright (c) 2003-2018, Intel Corporation. All rights reserved.

Aborted

So, I decided to run pin without any tool using the command pin -- /bin/ls and it works. Any idea why I get this error message ?

Many thanks


Solution

  • After some hours lost in the investigation of this issue with a colleague, we could not figure out the reason of this error. We tried on Kali and Debian that were up to date.

    Later on, I decided to try on a old Ubuntu virtual machine with the kernel 4.15.0-47-generic and it worked! More precisely:

    ➜  ~ uname -a
    Linux gpu 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    ➜  ~ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 18.04.1 LTS
    Release:    18.04
    Codename:   bionic
    

    I did not try on a newer version of Ubuntu, so I cannot state this is due to a new software component, such as a newer version of the kernel. My workaround is therefore to use an older version of the kernel, without having the certainty this is what caused the issue.

    Any further investigation answer on this thread that would identify the issue better will be marked as the answer.