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: anonymous
Subject: [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file
Date: Mon, 17 Jan 2022 06:44:52 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:94.0) Gecko/20100101 Firefox/94.0

Follow-up Comment #2, bug #61821 (project octave):

Thank you for your attention!
I'm on Windows 7 32-bit. I downloaded octave-7.0.90-w32.7z from
alpha.gnu.org.
Initially my guess was the issue may be a config bug or it possibly may be
related to gcc bug but after I found that it may be related to visibility of
symbols. I searched the bug archive for the "visibility" word and received to
these threads:
  oct-file has an undefined symbol https://savannah.gnu.org/bugs/?60567
  build fails on macOS with visibility settings 
https://savannah.gnu.org/bugs/?59820   

>From there I reached to this discourse topic:   
https://octave.discourse.group/t/visibility-of-symbols-in-octave-libraries

Previously I used to think I could use all headers that shipped with Octave to
develop packages/stand-alone programs. However I currently is noticed that
only those functions and classes that are explicitly tagged with macros like
OCTARRAY_API and  OCTINTERP_API are parts of the official interface to oct
API. With the recent decision all symbols, other than the tagged symbols, of
the Octave core libraries are made hidden (using a gcc capability). Therefore
it is very difficult and painful to develop packages that are relied on those
non tagged functions, if it is not impossible! The workaround may be including
Octave source codes in the packages or fetch them from the repository when
building the packages. However the workaround may fail because the linker may
refer to fake symbols in the core dlls and refuse to using the compiled
sources. 
All package maintainer should check the package sources line by line to find
those abandoned features, otherwise the packages compiles successfully but in
the runtime may encounter segfault.
I also have found some buggy features. Consider this example:


// A.h
struct A
{
  A();
};

//B.h
struct OCTINTERP_API B
{
  B() 
  {}
  
  void func (const A& a = A())
  {}
};
  

I have defined two classes "A" and "B" that one of them , "B", is a part of
public API and the other, "A", isn't. The constructor of "A" will be defined
in "A.cpp". However "B" is using "A" from its member function. Calling "func
()" results in segfault because it is using "A" that isn't a part of API. I
have seen such classes in Octave source tree. Even "B" is a part of the public
API it won't be usable at all.

There are possibly some issues related to import libraries that needs further
checks.

    _______________________________________________________

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]