Hi Barry,

The following is the instruction that causes the segmentation fault:

> 0x1fc7a174 <+84>:    lwz     r25,0(r5)

Register r5 stores the third argument to the function (p), which is not
defined if group is not MODP_CUSTOM (neither is the second argument, g,
but apparently it doesn't point to an inaccessible location).
Anyway, it seems that the compiler optimizes a bit too much for this to
work, that is, it always loads p.ptr (0) and p.len (4) into registers,
in disregard of the actual code path, causing the segmentation fault.

The patch at [1] (included in 5.0.1) indirectly fixes this issue as it
makes sure that the two arguments are always defined.  It should apply
cleanly to 4.5.2.

Regards,
Tobias

[1] http://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=11d6bc3e


_______________________________________________
Users mailing list
Users@lists.strongswan.org
https://lists.strongswan.org/mailman/listinfo/users

Reply via email to