You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Nicolás Lichtmaier <ni...@reloco.com.ar> on 2004/05/23 04:19:21 UTC

coredump! What am I doing wrong?

I'm experimenting with subversion's client library, and it dumps core if 
I don't apply this patch. Am I doing something wrong?
(cfg is NULL and the program crashes when trying to put it into a hastable).

Thanks!

Re: coredump! What am I doing wrong?

Posted by Greg Hudson <gh...@MIT.EDU>.
I'll give a slightly more philosophical answer to your question: parts
of libsvn_client are careful to check for context->config being NULL,
and parts are not.  We have no docstring to indicate whether the former
code is being overly defensive or the latter code is being sloppy.

If someone would like to resolve this situation for 1.1 (preferrably in
the direction of allowing context->config to be NULL, and adding a
docstring clarifying the caller's responsibilities with regard to the
context), it would probably be a bite-sized task.  Do note that you
might have to touch some code out of libsvn_client, because the config
field is passed as a parameter to functions like ra_lib->open.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: coredump! What am I doing wrong?

Posted by Branko Čibej <br...@xbc.nu>.
Nicolás Lichtmaier wrote:

>>> I'm experimenting with subversion's client library, and it dumps 
>>> core if I don't apply this patch. Am I doing something wrong?
>>> (cfg is NULL and the program crashes when trying to put it into a 
>>> hastable).
>>
>> I think you just answered you own question. :-)
>
> But how do I make cfg not-NULL. Is there a svn_read_config? (!).

You either create it yourself, or read it from a file. Try 
include/svn_config.h.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: coredump! What am I doing wrong?

Posted by Nicolás Lichtmaier <ni...@reloco.com.ar>.
>> I'm experimenting with subversion's client library, and it dumps core 
>> if I don't apply this patch. Am I doing something wrong?
>> (cfg is NULL and the program crashes when trying to put it into a 
>> hastable).
>
>
> I think you just answered you own question. :-)


But how do I make cfg not-NULL. Is there a svn_read_config? (!).


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: coredump! What am I doing wrong?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Nicolás Lichtmaier wrote:
> 
>>> I'm experimenting with subversion's client library, and it dumps core 
>>> if I don't apply this patch. Am I doing something wrong?
>>> (cfg is NULL and the program crashes when trying to put it into a 
>>> hastable).
>>
>>
>> I think you just answered you own question. :-)
>>
> Why? Where? I'm only doing this:
> 
>        SVN_ERR(svn_client_log(targets, &start, &head, TRUE, FALSE,
>                &log_receiver, NULL, ctx, pool));
> 
> Should I call something before this?

The 'config' member of your 'ctx' is NULL.  That's what it's trying to use.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: coredump! What am I doing wrong?

Posted by Nicolás Lichtmaier <ni...@reloco.com.ar>.
>> I'm experimenting with subversion's client library, and it dumps core 
>> if I don't apply this patch. Am I doing something wrong?
>> (cfg is NULL and the program crashes when trying to put it into a 
>> hastable).
>
> I think you just answered you own question. :-)
>
Why? Where? I'm only doing this:

        SVN_ERR(svn_client_log(targets, &start, &head, TRUE, FALSE,
                &log_receiver, NULL, ctx, pool));

Should I call something before this?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: coredump! What am I doing wrong?

Posted by Branko Čibej <br...@xbc.nu>.
Nicolás Lichtmaier wrote:

> I'm experimenting with subversion's client library, and it dumps core 
> if I don't apply this patch. Am I doing something wrong?
> (cfg is NULL and the program crashes when trying to put it into a 
> hastable).

I think you just answered you own question. :-)




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org