Bug 1952

Summary: DCE can't parse envp argument of main function
Product: dce Reporter: Hajime Tazaki <tazaki>
Component: otherAssignee: Hajime Tazaki <tazaki>
Status: RESOLVED FIXED    
Severity: major CC: ns-bugs
Priority: P5    
Version: unspecified   
Hardware: PC   
OS: Linux   

Description Hajime Tazaki 2014-07-16 10:48:34 EDT
https://groups.google.com/d/msg/ns-3-users/w__FyRKm564/NokUnR6eWS4J

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.