any debugging hunches on this assert in sendto_kdc.c?

Chris Hecker checker at d6.com
Sat Mar 16 05:34:25 EDT 2013


No, it wasn't a compiler bug (it never is), I was getting confused in 
the asm because there's dupe code there in the 1.9.2 version and there's 
a ton of inlining going on.  It looks like the bug was fixed  as a 
byproduct of this change:

https://github.com/krb5/krb5/commit/8b9d249e40601047e69c92d7acb578fd0bbafc00

If you look at that diff, and search for host+1, you can see two of them 
in the old code, and the second one is after the host loop, so host is 
n_conn, so host+1 is n_conn+1, which is out of bounds.

Man, that took forever.

Chris


On 2013-03-16 00:13, Chris Hecker wrote:
>
> Gah, this assert appears to be a gcc bug (this machine is running Centos
> 5.6, sadly), after digging into the asm and modifying the code for
> hours.  The host+1 expression in the call to service_fds is not
> reloading host and is using $esi after a bunch of inlined functions, so
> it's reading the next fd after the end, which is 0.
>
> So annoying.
>
> Chris
>
>
> On 2013-03-15 12:37, Chris Hecker wrote:
>>
>> If I have trouble fixing this for real, since it's pretty indirected
>> where the fds coming from, can I get a call on how bad it would be to
>> just return 0 from cm_get_ssflags if the fd doesn't exist?  It's only
>> called from one place in sendto_kdc.c, from service_fds.
>>
>> sendto_kdc.c:617: cm_get_ssflags: Assertion `i < selstate->nfds' failed.
>>
>> Thanks,
>> Chris
>>
>>
>> On 2013-03-14 18:18, Chris Hecker wrote:
>>>
>>> Hrm, these didn't fix the assert...guess I'm going to have to debug
>>> it...will report back.
>>>
>>> Chris
>>>
>>>
>>> On 2013-03-04 08:35, Greg Hudson wrote:
>>>> On 03/04/2013 02:49 AM, Chris Hecker wrote:
>>>>> Maybe the assert problem is known and fixed too?  A guy can dream.
>>>>
>>>> The other fixes you want to look at are:
>>>>
>>>> https://github.com/krb5/krb5/commit/d47cb3023828da211cd342f6d94d56c97d102227
>>>>
>>>>
>>>>
>>>> https://github.com/krb5/krb5/commit/279a040bf3bf98a81502410dd71ccdc630683233
>>>>
>>>>
>>>>
>>>> https://github.com/krb5/krb5/commit/2b06a22f7fd8ec01fb27a7335125290b8ceb6f18
>>>>
>>>>
>>>>
>>>>
>>>> The second of those might account for the assertion failure you're
>>>> seeing.
>>>>
>>>>


More information about the krbdev mailing list