[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Found a warning in libevent 2.0.21



On Sep 16, 2013, at 9:20 AM, Nick Mathewson <nickm@xxxxxxxxxxxxx> wrote:

> On Mon, Sep 16, 2013 at 12:08 PM, Ralph Castain <rhc@xxxxxxxxxxxx> wrote:
>> Hi Nick
>> 
>> Sorry for delayed response - been a little hectic, and had to think about this a bit. I gather your concern is that (a) someone builds libevent on a 10.7 or above Mac, and then (b) someone executes that binary on a pre-10.7 Mac, and therefore arc4random_buf is not found? If so, I would think you'd generate a loader failure before you could check for a NULL pointer - yes?
> 
> It turns out that this isn't actually the case; people reported
> getting errors at call time, not at link time.

Ick - too bad, would have made life simpler

> 
>> Problem is that I get this warning on OSX as well as on Linux, so confining it to OSX wouldn't remove it. Only thing I can think of (assuming the loader failure doesn't occur) is to have a runtime check of what OSX level we are on, and then protect the call to arc4random_buf using that instead of checking for a NULL pointer.
> 
> Hm. That's an option. We could also suppress the warning for that one
> line, maybe, or find a way to do the check that doesn't trigger the
> warning?

I'm unaware of a way to turn the warning off for one line - of course, we could turn if off for all of libevent, but that seems a tad extreme and may not be a good idea.

Only other option I can think of would be to use dlsym to check for the existence of the function - would that be an acceptable solution?


> 
> yrs,
> -- 
> Nick
> ***********************************************************************
> To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
> unsubscribe libevent-users    in the body.

***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.