Re: [Speedycgi-users] speedy bus error under FreeBSD-5.x
Brought to you by:
samh
|
From: Sam H. <sa...@da...> - 2003-05-21 18:58:26
|
Thanks for the fixes! Looks like I need to start using a malloc debugger.
Sam
> Hi all,
>
> It seems the speedy executable has some problems running under FreeBSD-5.x,
> e.g.:
>
> --cut--
> [lth@bhor speedy]$ ./speedy -- -v
> Bus error (core dumped)
> [lth@bhor speedy]$
> --cut--
>
> This, and another bus error problem stems from a couple of code bugs, solved
> by the following patch:
>
> --cut--
> --- src/speedy_opt.c Mon Sep 30 07:19:54 2002
> +++ /tmp/speedy_opt.c Tue May 20 11:11:28 2003
> @@ -165,6 +165,8 @@ static void cmdline_split(
> ++p;
> if (*p)
> strlist_append(doing_speedy_opts ? speedy_opts : perl_args,
> *p);
> + else
> + break;
> }
>
> if (*p) {
> @@ -422,7 +424,7 @@ const char * const *speedy_opt_script_ar
> }
>
> SPEEDY_INLINE const char *speedy_opt_script_fname(void) {
> - return exec_argv.ptrs[script_argv_loc];
> + return exec_argv.len > script_argv_loc ?
> exec_argv.ptrs[script_argv_loc] : NULL;
> }
>
> #ifdef SPEEDY_BACKEND
> --cut--
>
> Apparently, malloc() of current beta versions of 5.x has the the 'J' flag
> set, and is therefore much more unforgiving regarding pointer overruns than
> under 4.x (and under Linux), so this is probably why this has not been
> discovered before.
>
> Thanks to tobez for invaluable help with debugging this.
>
> /Lars
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ObjectStore.
> If flattening out C++ or Java code to make your application fit in a
> relational database is painful, don't do it! Check out ObjectStore.
> Now part of Progress Software. http://www.objectstore.net/sourceforge
> _______________________________________________
> Speedycgi-users mailing list
> Spe...@li...
> https://lists.sourceforge.net/lists/listinfo/speedycgi-users
>
|