Perhaps someone can shed some light on this.
I received this from a friend of mine, who does some packaging for
debian.
------------------------------
I have been running a self-compiled version of the latest edbrowse
3.8.9 on
Debian, compiled with GCC 12.2. It segfaults on startup, and the
backtrace
suggests it is in main.c:1926, where it nzFree's sslCerts. This is
likely
caused by some hardning options of the Debian packaging infrastructure.
It cause sslCerts to be not NULL-initialised. I couldn't track down
exactly
which option it is, but the simple fix is to NULL out the static pointer
sslCerts. I could hand in a patch, if you like (or a pull request). At
the
moment, this makes Edbrowse unusable on Debian.
------------------------------
I am rather stunned by this.
I have been using C since 1980.
Ever since the original K&R, global uninitialized variables are 0.
I don't understand how sslCerts could be not zero.
The "simple fix" I'm guessing is to set it to 0,
but that's not simple because there are dozens of global variables, and
some static variables too, that are not initialized, that I count on
being zero.
If we got past sslCerts we would just run into another one.
We'd have to scan through the entire body of code, some 50 thousand
lines, to find them all and set them all to 0,
or,
we could try to understand how and why sslCerts is not null,
because I would have said that was impossible.
I just did an internet search, and site after site after site confirms
that all such uninitialized variables are 0.
Karl Dahlke
- uninitialized globals Karl Dahlke
-