Bug 1952 - DCE can't parse envp argument of main function
DCE can't parse envp argument of main function
Product: dce
Classification: Unclassified
Component: other
PC Linux
: P5 major
Assigned To: Hajime Tazaki
Depends on:
  Show dependency treegraph
Reported: 2014-07-16 10:48 EDT by Hajime Tazaki
Modified: 2014-07-16 11:11 EDT (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Hajime Tazaki 2014-07-16 10:48:34 EDT

1. I've compiled bash 4.1 (and 4.3, but 4.1 seems to have been the one originally used in the examples) with the needed -fPIC and -pie flags
  using the hints given in the example/bash/dce-bash-simple.cc
2. Checked if the executable is now dynamic, using readelf

3. run the example: './waf --run dce-bash-simple --command-template="gdb --args %s "' but a sigsegv is given:

The reason of this crash is due to the fact that DCE doesn't pass envp argument (3rd one) of main function, resulting bash accesses uninitialized memory area making him crash.
Comment 1 Hajime Tazaki 2014-07-16 11:11:14 EDT
fixed with changeset 2973905a7151.