Hi,

I'd say the error is upwards. I mean, I'd expect vm_executable_path()  
to return an immutable string (somewhat reinforced by the fact that  
it returns "const char *"). And in fact, there's code in factor.c  
that assumes this, since it does:

         const F_CHAR *executable_path = vm_executable_path();
         if(!executable_path)
                 executable_path = argv[0];

I wouldn't attempt to free() the memory at argv[0] .

Greetings,
   Jorge


On Feb 2, 2008, at 2:03 PM, Daniel Néri wrote:

> Slava Pestov <[EMAIL PROTECTED]> writes:
>
>> Thanks, I've incorporated this.
>
> It doesn't quite work as default_image_path expects a malloc'ed  
> string:
>
>   $ ./factor
>   factor in realloc(): warning: junk pointer, too high to make sense.
>   fatal_error: Out of memory in safe_realloc 0
>
> A fix can be pulled from my repo.
>
> Regards,
> Daniel
>
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to