Analytics Tracking Code

Tuesday, November 25, 2014

FreeSWITCH on OpenBSD - Project Status 2014-11-25

There is this thing called the y2038 issue. It's similar to the y2k bug, but in my opinion, much more likely to cause issues. If you have a moment read this 2013 paper on moving to 64bit time_t. So moral of the story is that openbsd has migrated to 64bit time_t and this is of course impacting software which casually depends on 32bit time_t.

The first time_t bug I squashed in freeswitch (at least on my openbsd shallow fork project thing) is in the extension registration code where it tries to update the registration expiration time in the registration db. The fs 1.2 code presumes that time_t is 32 bits by using printf %lu to build its sqlite query; at the same time as patching the code I improved its readability (in my opinion) and corrected a memory leak. This particular bug was easy to find since it was causing a segmentation fault, other similar problems may(will) be more subtle.

Anyway here's the patch. I've seen a number of other similar calls, which I will be auditing carefully.

1 comment:

  1. Excellent post. Thanks for sharing stuff like this. Waiting for your new post. Also try COC MOD which is available on Clashmod.

    ReplyDelete