octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file
Date: Sat, 26 Feb 2022 08:04:19 -0500 (EST)

Update of bug #61821 (project octave):

                  Status:               Confirmed => Patch Submitted        

    _______________________________________________________

Follow-up Comment #20:

Attached is a patch that removes `time_t` from Octave's (public) API.
I opted for using a pre-processor `define` (instead of a `typedef`) so that
packages or user code that might be affected by this change could switch over
to using `OCTAVE_TYPE_T` and add something like the following to be backward
compatible:

#ifndef OCTAVE_TYPE_T
#  define OCTAVE_TYPE_T time_t
#endif


I don't know if something similarly straight-forward would be possible if we
use a `typedef` instead.

The nature of the issue requires to make a "hard cut" and remove the functions
that take `time_t` arguments without deprecating them. If we kept them around
for a few versions, the API-header mismatch would still be an issue. (Or am I
missing something?)

The GitHub-CI still succeeded with these changes on Linux, Windows and MacOS.
The latter seems to have a 32-bit wide `time_t` type. So, I'm hopeful that
those changes will work on platforms with either a 32-bit or a 64-bit `time_t`
type.

I haven't checked if this would actually prevent the crash reported here. But
IIUC what the actual issue is, I'd guess it would.

I based that patch on the stable branch. But I'd like to get feedback before
pushing it anywhere.


(file #52935)
    _______________________________________________________

Additional Item Attachment:

File name: bug61821-no-time_t-in-API.patch Size:13 KB
   
<https://file.savannah.gnu.org/file/bug61821-no-time_t-in-API.patch?file_id=52935>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61821>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]