debug: memory access issue when running with -Xxxx
Hi, I was trying to debug move verbosely, with -Xxxx (wish I hadn't) and encountered the error below (sometimes it crashes sometimes it just hangs): *** Error in `/usr/local/sbin/radiusd': malloc(): memory corruption: 0x000000000096c690 *** When using valgrind it doesn't crash but does give some insights, see attached both gdb and valgrind logs (with -Xxxx). I spent a couple of hours on this today, but only managed to somehow prevent the mschap crash but then there is another one, it is probably wrong but might give an idea. [admin@kdc freeradius-server]$ git diff diff --git a/src/lib/value.c b/src/lib/value.c index ca18327af..442d81e47 100644 --- a/src/lib/value.c +++ b/src/lib/value.c @@ -1381,8 +1381,8 @@ ssize_t value_data_cast(TALLOC_CTX *ctx, value_data_t *dst, if (src_type == PW_TYPE_OCTETS) { do_octets: - value_data_hton(dst, dst_type, src->octets, src_len); - return src_len; + value_data_hton(dst, dst_type, src, sizeof(value_data_t)); + return sizeof(value_data_t);; } Thanks, Isaac
participants (1)
-
Isaac Boukris