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

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

[Octave-bug-tracker] [bug #55542] Undefine bahavior in loading oct files


From: anonymous
Subject: [Octave-bug-tracker] [bug #55542] Undefine bahavior in loading oct files and shred libraries
Date: Tue, 22 Jan 2019 08:03:39 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:60.9) Goanna/4.1 PaleMoon/28.2.0a1

URL:
  <https://savannah.gnu.org/bugs/?55542>

                 Summary: Undefine bahavior in loading oct files and shred
libraries
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 22 Jan 2019 01:03:37 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Missed Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

Knowing that:

"The standard does not allow to cast function pointers to void*"

link1
<https://stackoverflow.com/questions/5579835/c-function-pointer-casting-to-void-pointer>

link2
<https://stackoverflow.com/questions/13696918/c-cast-void-pointer-to-function-pointer>

In "liboctave/util/oct-shlib.h" and "liboctave/util/oct-shlib.cpp" the return
type of the functions "search" and "global_search" is "void*" but they should
return a function pointer. Therefore currently loading oct-files and shared
libraries is based on undefined behavior.

Instead of "void*"  a function pointer such as "void(*)()" should be used.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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