[OpenSIPS-Devel] [opensips] drouting.c: segfault due to gw == NULL (#154)

Stéphane Alnet notifications at github.com
Tue Dec 31 01:07:07 CET 2013


This is actually the issue I think we encountered originally with `drouting.c` and which I was trying to fix with #153 ; obviously this is a different issue.

At line 484 of drouting.c:

    if ( (gw->flags & DR_DST_STAT_DIRT_FLAG)==0 )

`gw` was the variable used in the loop above (line 454 to 472); however at that point the loop is over, so `gw` must be NULL.

(It took me a while to understand what was happening, because the optimizer was optimizing the variable out, so i first thought it was an optimizer bug when looking in gdb.)

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/154
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20131230/74d115ff/attachment.htm>


More information about the Devel mailing list