[Issue 23654] execv_: toAStringz: memory corruption

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 29 21:31:49 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23654

--- Comment #7 from kdevel <kdevel at vogtner.de> ---
Created attachment 1888
  --> https://issues.dlang.org/attachment.cgi?id=1888&action=edit
D-Program execv-recur.d demonstrating the memory corruption

//
// execv-recur.d
// 2023-08-29 stvo
// 
// disable the GC with
//
//    DRT_GCOPT=disable:1 ./execv-recur 1
//
// this program then expectedly reports
//
//    rc = <-1> errno = <7> strerror = <Argument list too long>
//
// If run with enabled GC
//
//    ./execv-recur 1
//
// the memory gets corrupted and the program reports
//
//    object.Exception at execv-recur.d(49): exp <4> actual <131072>
//

--


More information about the Digitalmars-d-bugs mailing list