Skip to content

__libc_dlopen_mode() flag must be update #13

@ParkHanbum

Description

@ParkHanbum

currently source code use 1 to flag for load shared object immediately. but this is not enough all of cases, if shared object need to be modify it own properties when load time.

refer glibc-2.28 source code. at line 1257:

if ((mode & (__RTLD_DLOPEN | __RTLD_AUDIT)) == __RTLD_DLOPEN)
   < change specific memory proctection >
    __stack_prot |= PROT_READ|PROT_WRITE|PROT_EXEC;
else 
    __stack_prot |= PROT_READ|PROT_WRITE|PROT_EXEC;

if you pass the 1 to argument for __libc_dlopen_mode, there is a possibility of occur SIGSEGV.

so, my suggest is very simple, just pass 0x80000001, not 1.
then everyone will happy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions