Re: `program_invocation_name' bug =?=> `gnomelib_init' API change
- From: sopwith redhat com (Elliot Lee)
- To: gnome-list gnome org
- Subject: Re: `program_invocation_name' bug =?=> `gnomelib_init' API change
- Date: 22 Nov 1998 18:28:46 GMT
On 22 Nov 1998 00:02:26 -0600, Raja R Harinath <firstname.lastname@example.org> wrote:
>I was experiencing a lot of SIGSEGVs recently. While trying to figure
>this out I came across one bug that could be causing some.
>On non-glibc systems, the variable `program_invocation_name' is not set
>until `gnomelib_parse_args' is called. By this time `gnome_client_init'
>is already called. `gnome_client_init' hence initializes
>`master_client->program' to a NULL value, which when used unwarily (as
>in passing to printf or strrchr), can cause a SIGSEGV.
>One hacky way to solve this is in `gnome_master_client' to verify if
>`master_client->program' is NULL, and re-initialize it there.
>A better way, IMHO, is to pass just argv to `gnomelib_init'. This
>however involves changing the `gnomelib_init' API. AFAI can make out,
>this is a low impact change, since I could find only 10 direct calls to
>`gnomelib_init', 5 of which were in the test-suite.
The first parameter to 'gnomelib_init' should be the app ID ("gnumeric",
"test-gnome", whatever) instead of being the basename(executable_name). So it
probably needs to be a string constant...
"In film you will find four basic story lines. Man versus man, man
versus nature, nature versus nature, and dog versus vampire."
- Steven Spielberg
] [Thread Prev