Skip to content

[lldb-dap] inferior always inherits parent environment #142127

Closed
@nd

Description

@nd

Happens in lldb-dap version 21.0.0git (revision 7c99601).

To reproduce, debug the program by sending launch { ... "env": {"FOO": "BAR"}}

#include <cstdio>
#include <unistd.h>

int main() {
    char *s = *environ;
    for (int i = 0; s; i++) {
        printf("%s\n", s);
        s = *(environ + i);
    }
    return 0;
}

Expected: the program prints only FOO=BAR.

Actual: the program prints all variables in the parent environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lldb-dapquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions