Re: `program_invocation_name' bug =?=> `gnomelib_init' API change
- From: Raja R Harinath <harinath cs umn edu>
- To: sopwith redhat com (Elliot Lee)
- Cc: gnome-list gnome org
- Subject: Re: `program_invocation_name' bug =?=> `gnomelib_init' API change
- Date: 22 Nov 1998 13:11:21 -0600
sopwith@redhat.com (Elliot Lee) writes:
> On 22 Nov 1998 00:02:26 -0600, Raja R Harinath <harinath@cs.umn.edu> wrote:
> >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[0] 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...
That's right. What I meant is to add one more parameter to
`gnomelib_init', so that we could call it with
gnomelib_init(app_id, app_version, argv[0]);
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]