joyent/libuv — Issue #313: uv_setup_args not working on Linux
Author: saghul
Created: 2012-02-14 07:02:07+00:00
State: open

Hi,

I was testing uv_get/set process_title on Linux and it didn't seem to work properly, I always got the empty string back (from the get operation).

I tracked it doen to the uv_setup_args function:

process_title.len = s + strlen(s) + 1 - argv[0];
printf("-- test %zu\n", process_title.len);
// this prints a huge number: 18446744073708403548

The malloc tight after the length calculation will fail and thus the empty string will be returned. I tried to find the fix myself but it eludes em :-S