Markakd / safe_tcmalloc

Apache License 2.0
0 stars 0 forks source link

Pointer propagated through memcpy-style #7

Open Markakd opened 1 year ago

Markakd commented 1 year ago

case from njs, https://github.com/nginx/njs/issues/469 and https://github.com/nginx/njs/issues/451

njs_function_frame_save(njs_vm_t *vm, njs_frame_t *frame, u_char *pc)
{
    size_t              value_count, n;
    njs_value_t         *start, *end, *p, **new, *value, **local;
    njs_function_t      *function;
    njs_native_frame_t  *active, *native;

    // implicit pointer propagation, which will not have an escape and fail detection
    *frame = *vm->active_frame;
    ...
}