Open vbraun opened 1 month ago
I need to reproduce that with giac natively. I understand it's a call to gbasis with katsura 9 (but maybe with katsura10, katsura indexation is not always consistent)
kat9:=[x1 + 2*x2 + 2*x3 + 2*x4 + 2*x5 + 2*x6 + 2*x7 + 2*x8 + 2*x9 - 1, x1^2 + 2*x2^2 + 2*x3^2 + 2*x4^2 + 2*x5^2 + 2*x6^2 + 2*x7^2 + 2*x8^2 + 2*x9^2 - x1, 2*x1*x2 + 2*x2*x3 + 2*x3*x4 + 2*x4*x5 + 2*x5*x6 + 2*x6*x7 + 2*x7*x8 + 2*x8*x9 - x2, x2^2 + 2*x1*x3 + 2*x2*x4 + 2*x3*x5 + 2*x4*x6 + 2*x5*x7 + 2*x6*x8 + 2*x7*x9 - x3, 2*x2*x3 + 2*x1*x4 + 2*x2*x5 + 2*x3*x6 + 2*x4*x7 + 2*x5*x8 + 2*x6*x9 - x4, x3^2 + 2*x2*x4 + 2*x1*x5 + 2*x2*x6 + 2*x3*x7 + 2*x4*x8 + 2*x5*x9 - x5, 2*x3*x4 + 2*x2*x5 + 2*x1*x6 + 2*x2*x7 + 2*x3*x8 + 2*x4*x9 - x6, x4^2 + 2*x3*x5 + 2*x2*x6 + 2*x1*x7 + 2*x2*x8 + 2*x3*x9 - x7, 2*x4*x5 + 2*x3*x6 + 2*x2*x7 + 2*x1*x8 + 2*x2*x9 - x8]; H:=gbasis(kat9,[x1,x2,x3,x4,x5,x6,x7,x8,x9])
Can you reproduce the crash while running from giac interpreter, that is if you put the code above in a text file, say katsura9 and run
icas katsura9
N.B.: If you have the source code of giac, this file is already available in the examples/groebner subdirectory.
If you can reproduce the crash, I will also need some additional informations: how many threads are processed in parallel? (this is displayed at startup with something like
// Maximum number of parallel threads 1
)
And I'll check when I'll go back at the office where I have a mac.
Thank you
buildbot-sage@Mini-M2:~/worker/sage_git/build$ giac
// Maximum number of parallel threads 1
// Unable to find keyword file /Applications/usr/share/giac/doc/en/keywords
Added 0 synonyms
Welcome to giac readline interface, version 1.9.0
(c) 2001,2021 B. Parisse & others
Homepage http://www-fourier.ujf-grenoble.fr/~parisse/giac.html
Released under the GPL license 3.0 or above
See http://www.gnu.org for license details
May contain BSD licensed software parts (lapack, atlas, tinymt)
-------------------------------------------------
Press CTRL and D simultaneously to finish session
Type ?commandname for help
0>> kat9:=[x1 + 2*x2 + 2*x3 + 2*x4 + 2*x5 + 2*x6 + 2*x7 + 2*x8 + 2*x9 - 1, x1^2 + 2*x2^2 + 2*x3^2 + 2*x4^2 + 2*x5^2 + 2*x6^2 + 2*x7^2 + 2*x8^2 + 2*x9^2 - x1, 2*x1*x2 + 2*x2*x3 + 2*x3*x4 + 2*x4*x5 + 2*x5*x6 + 2*x6*x7 + 2*x7*x8 + 2*x8*x9 - x2, x2^2 + 2*x1*x3 + 2*x2*x4 + 2*x3*x5 + 2*x4*x6 + 2*x5*x7 + 2*x6*x8 + 2*x7*x9 - x3, 2*x2*x3 + 2*x1*x4 + 2*x2*x5 + 2*x3*x6 + 2*x4*x7 + 2*x5*x8 + 2*x6*x9 - x4, x3^2 + 2*x2*x4 + 2*x1*x5 + 2*x2*x6 + 2*x3*x7 + 2*x4*x8 + 2*x5*x9 - x5, 2*x3*x4 + 2*x2*x5 + 2*x1*x6 + 2*x2*x7 + 2*x3*x8 + 2*x4*x9 - x6, x4^2 + 2*x3*x5 + 2*x2*x6 + 2*x1*x7 + 2*x2*x8 + 2*x3*x9 - x7, 2*x4*x5 + 2*x3*x6 + 2*x2*x7 + 2*x1*x8 + 2*x2*x9 - x8]; H:=gbasis(kat9,[x1,x2,x3,x4,x5,x6,x7,x8,x9])
zsh: segmentation fault giac
And in the debugger
$ sudo lldb giac
(lldb) target create "giac"
Current executable set to '/Users/vbraun/Sage/local/bin/giac' (arm64).
(lldb) run
Process 76999 launched: '/Users/vbraun/Sage/local/bin/giac' (arm64)
// Maximum number of parallel threads 1
// Unable to find keyword file /Applications/usr/share/giac/doc/en/keywords
Added 0 synonyms
Welcome to giac readline interface, version 1.9.0
(c) 2001,2021 B. Parisse & others
Homepage http://www-fourier.ujf-grenoble.fr/~parisse/giac.html
Released under the GPL license 3.0 or above
See kat9:=[x1 + 2*x2 + 2*x3 + 2*x4 + 2*x5 + 2*x6 + 2*x7 + 2*x8 + 2*x9 - 1, x1^2 + 2*x2^2 + 2*x3^2 + 2*x4^2 + 2*x5^2 + 2*x6^2 + 2*x7^2 + 2*x8^2 + 2*x9^2 - x1, 2*x1*x2 + 2*x2*x3 + 2*x3*x4 + 2*x4*x5 + 2*x5*x6 + 2*x6*x7 + 2*x7*x8 + 2*x8*x9 - x2, x2^2 + 2*x1*x3 + 2*x2*x4 + 2*x3*x5 + 2*x4*x6 + 2*x5*x7 + 2*x6*x8 + 2*x7*x9 - x3, 2*x2*x3 + 2*x1*x4 + 2*x2*x5 + 2*x3*x6 + 2*x4*x7 + 2*x5*x8 + 2*x6*x9 - x4, x3^2 + 2*x2*x4 + 2*x1*x5 + 2*x2*x6 + 2*x3*x7 + 2*x4*x8 + 2*x5*x9 - x5, 2*x3*x4 + 2*x2*x5 + 2*x1*x6 + 2*x2*x7 + 2*x3*x8 + 2*x4*x9 - x6, x4^2 + 2*x3*x5 + 2*x2*x6 + 2*x1*x7 + 2*x2*x8 + 2*x3*x9 - x7, 2*x4*x5 + 2*x3*x6 + 2*x2*x7 + 2*x1*x8 + 2*x2*x9 - x8]; H:=gbasis(kat9,[x1,x2,x3,x4,x5,x6,x7,x8,x9])
Process 76999 stopped help
* thread #9, stop reason = EXC_BAD_ACCESS (code=1, address=0x11f200000) 1, x1^2 + 2*x2^2 + 2*x3^2 + 2*x4^2 + 2*x5^2 + 2*x6^2 + 2*x7^2 + 2*x8^2 + 2*x9^2 - x1, 2*x1*x2 + 2*x2*x3 + 2*x3*x4 + 2*x4*x5 + 2*x5*x6 + 2*x frame #0: 0x000000010253234c libgiac.0.dylib`void giac::zmakelinesplit<giac::tdeg_t14>(giac::zpolymod<giac::tdeg_t14> const&, giac::tdeg_t14 const*, std::__1::vector<giac::tdeg_t14, std::__1::allocator<giac::tdeg_t14>> const&, void*, std::__1::vector<int, std::__1::allocator<int>> const&, std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>&, std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>*, int) + 656at9,[x1,x2,x3,x4,x5,x6,x7,x8,x9])
libgiac.0.dylib`giac::zmakelinesplit<giac::tdeg_t14>:
-> 0x10253234c <+656>: ldp x12, x13, [x8]
0x102532350 <+660>: cmp x12, x9
0x102532354 <+664>: ccmp x13, x11, #0x0, eq
0x102532358 <+668>: b.eq 0x102532374 ; <+696>
Target 0: (giac) stopped.
(lldb) bt
* thread #9, stop reason = EXC_BAD_ACCESS (code=1, address=0x11f200000)
* frame #0: 0x000000010253234c libgiac.0.dylib`void giac::zmakelinesplit<giac::tdeg_t14>(giac::zpolymod<giac::tdeg_t14> const&, giac::tdeg_t14 const*, std::__1::vector<giac::tdeg_t14, std::__1::allocator<giac::tdeg_t14>> const&, void*, std::__1::vector<int, std::__1::allocator<int>> const&, std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>&, std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>*, int) + 656
frame #1: 0x0000000102531dd8 libgiac.0.dylib`void giac::do_zbuildM<giac::tdeg_t14>(giac::vectzpolymod<giac::tdeg_t14> const&, std::__1::vector<unsigned int, std::__1::allocator<unsigned int>> const&, int, bool, std::__1::vector<std::__1::vector<giac::tdeg_t14, std::__1::allocator<giac::tdeg_t14>>, std::__1::allocator<std::__1::vector<giac::tdeg_t14, std::__1::allocator<giac::tdeg_t14>>>> const&, std::__1::vector<giac::tdeg_t14, std::__1::allocator<giac::tdeg_t14>> const&, std::__1::vector<int, std::__1::allocator<int>> const&, void*, std::__1::vector<giac::coeffindex_t, std::__1::allocator<giac::coeffindex_t>>&, unsigned int, std::__1::vector<std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>, std::__1::allocator<std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>>>&, std::__1::vector<std::__1::vector<int, std::__1::allocator<int>>, std::__1::allocator<std::__1::vector<int, std::__1::allocator<int>>>>&, std::__1::vector<giac::sparse_element, std::__1::allocator<giac::sparse_element>>&, int, int, int) + 404
frame #2: 0x0000000102529978 libgiac.0.dylib`void giac::zbuildM<giac::tdeg_t14>(giac::vectzpolymod<giac::tdeg_t14> const&, std::__1::vector<unsigned int, std::__1::allocator<unsigned int>> const&, int, bool, int, std::__1::vector<std::__1::vector<giac::tdeg_t14, std::__1::allocator<giac::tdeg_t14>>, std::__1::allocator<std::__1::vector<giac::tdeg_t14, std::__1::allocator<giac::tdeg_t14>>>> const&, std::__1::vector<giac::tdeg_t14, std::__1::allocator<giac::tdeg_t14>> const&, std::__1::vector<int, std::__1::allocator<int>> const&, void*&, std::__1::vector<giac::coeffindex_t, std::__1::allocator<giac::coeffindex_t>>&, unsigned int, std::__1::vector<std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>, std::__1::allocator<std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>>>&, std::__1::vector<std::__1::vector<int, std::__1::allocator<int>>, std::__1::allocator<std::__1::vector<int, std::__1::allocator<int>>>>&, std::__1::vector<giac::sparse_element, std::__1::allocator<giac::sparse_element>>&, int) + 264
frame #3: 0x0000000102521d38 libgiac.0.dylib`int giac::zf4mod<giac::tdeg_t14>(giac::vectzpolymod<giac::tdeg_t14>&, std::__1::vector<unsigned int, std::__1::allocator<unsigned int>> const&, int, std::__1::vector<giac::paire, std::__1::allocator<giac::paire>> const&, std::__1::vector<unsigned int, std::__1::allocator<unsigned int>> const*&, giac::vectzpolymod<giac::tdeg_t14>&, bool, unsigned int&, std::__1::vector<giac::paire, std::__1::allocator<giac::paire>>*, std::__1::vector<giac::zinfo_t<giac::tdeg_t14>, std::__1::allocator<giac::zinfo_t<giac::tdeg_t14>>>&, unsigned int&, bool, int, bool, int, int) + 4348
frame #4: 0x0000000102517ef0 libgiac.0.dylib`bool giac::in_zgbasis<giac::tdeg_t14>(giac::vectpolymod<giac::tdeg_t14>&, unsigned int, std::__1::vector<unsigned int, std::__1::allocator<unsigned int>>&, int, bool, std::__1::vector<giac::paire, std::__1::allocator<giac::paire>>*, std::__1::vector<giac::zinfo_t<giac::tdeg_t14>, std::__1::allocator<giac::zinfo_t<giac::tdeg_t14>>>&, bool, bool, bool, int, bool) + 6400
frame #5: 0x000000010250669c libgiac.0.dylib`bool giac::zgbasisrur<giac::tdeg_t14>(giac::vectpoly8<giac::tdeg_t14>&, giac::vectpolymod<giac::tdeg_t14>&, std::__1::vector<unsigned int, std::__1::allocator<unsigned int>>&, int, bool, std::__1::vector<giac::paire, std::__1::allocator<giac::paire>>*, std::__1::vector<giac::zinfo_t<giac::tdeg_t14>, std::__1::allocator<giac::zinfo_t<giac::tdeg_t14>>>&, bool, bool, bool, bool, int, bool, int&, giac::vectpolymod<giac::tdeg_t14>&, giac::polymod<giac::tdeg_t14>&, giac::polymod<giac::tdeg_t14>&, giac::polymod<giac::tdeg_t14>&, giac::polymod<giac::tdeg_t14>*, giac::polymod<giac::tdeg_t14>*) + 376
frame #6: 0x00000001024ff288 libgiac.0.dylib`int giac::in_mod_gbasis<giac::tdeg_t14>(giac::vectpoly8<giac::tdeg_t14>&, bool, bool, int&, giac::context const*, giac::gbasis_param_t, int) + 4476
frame #7: 0x00000001024ecc9c libgiac.0.dylib`giac::gbasis8(giac::vectpoly const&, giac::order_t&, giac::vectpoly&, giac::environment*, bool, bool, int&, giac::context const*, giac::gbasis_param_t) + 552
frame #8: 0x000000010200c484 libgiac.0.dylib`giac::giac_gbasis(giac::vectpoly&, giac::gen const&, giac::environment*, int, int&, giac::context const*, giac::gbasis_param_t) + 960
frame #9: 0x000000010200be98 libgiac.0.dylib`giac::gbasis(giac::vectpoly const&, giac::gen const&, bool, int, giac::environment*, int&, giac::context const*, giac::gbasis_param_t) + 672
frame #10: 0x000000010200dbd8 libgiac.0.dylib`giac::_gbasis(giac::gen const&, giac::context const*) + 3812
frame #11: 0x0000000101eeca24 libgiac.0.dylib`giac::symbolic::eval(int, giac::context const*) const + 1320
frame #12: 0x0000000102712fc8 libgiac.0.dylib`giac::gen::in_eval(int, giac::gen&, giac::context const*) const + 1304
frame #13: 0x0000000101eed42c libgiac.0.dylib`giac::eval_sto(giac::gen const&, int, giac::context const*) + 1824
frame #14: 0x0000000102712fc8 libgiac.0.dylib`giac::gen::in_eval(int, giac::gen&, giac::context const*) const + 1304
frame #15: 0x00000001027128ac libgiac.0.dylib`giac::eval_VECT(giac::gen const&, giac::gen&, int, int, giac::context const*) + 956
frame #16: 0x00000001027199ac libgiac.0.dylib`giac::in_eval_vect(giac::gen const&, giac::gen&, int, giac::context const*) + 9344
frame #17: 0x00000001024ba3b8 libgiac.0.dylib`giac::protectevalorevalf(giac::gen const&, int, bool, giac::context const*) + 808
frame #18: 0x0000000102291bc8 libgiac.0.dylib`giac::in_thread_eval(void*) + 284
frame #19: 0x0000000186139f94 libsystem_pthread.dylib`_pthread_start + 136
Thanks for the detailled information. The lldb session would be more interesting if giac was compiled with debug infos, it should be possible to see the precise line where the segfault happens, and examine variables. I'll do that when I'll have access to a Mac, should be on Tuesday November 5th or Wednesday 6th. Hopefully, that's a mono-thread execution, this should be easier to fix than a multi-threaded gbasis.
Compiled with debug symbols:
(lldb) run
Process 43866 launched: '/Users/vbraun/Sage/local/bin/giac' (arm64)
// Maximum number of parallel threads 1
// Unable to find keyword file /Applications/usr/share/giac/doc/en/keywords
Added 0 synonyms
Welcome to giac readline interface, version 1.9.0
(c) 2001,2021 B. Parisse & others
Homepage http://www-fourier.ujf-grenoble.fr/~parisse/giac.html
Released under the GPL license 3.0 or above
See kat9:=[x1 + 2*x2 + 2*x3 + 2*x4 + 2*x5 + 2*x6 + 2*x7 + 2*x8 + 2*x9 - 1, x1^2 + 2*x2^2 + 2*x3^2 + 2*x4^2 + 2*x5^2 + 2*x6^2 + 2*x7^2 + 2*x8^2 + 2*x9^2 - x1, 2*x1*x2 + 2*x2*x3 + 2*x3*x4 + 2*x4*x5 + 2*x5*x6 + 2*x6*x7 + 2*x7*x8 + 2*x8*x9 - x2, x2^2 + 2*x1*x3 + 2*x2*x4 + 2*x3*x5 + 2*x4*x6 + 2*x5*x7 + 2*x6*x8 + 2*x7*x9 - x3, 2*x2*x3 + 2*x1*x4 + 2*x2*x5 + 2*x3*x6 + 2*x4*x7 + 2*x5*x8 + 2*x6*x9 - x4, x3^2 + 2*x2*x4 + 2*x1*x5 + 2*x2*x6 + 2*x3*x7 + 2*x4*x8 + 2*x5*x9 - x5, 2*x3*x4 + 2*x2*x5 + 2*x1*x6 + 2*x2*x7 + 2*x3*x8 + 2*x4*x9 - x6, x4^2 + 2*x3*x5 + 2*x2*x6 + 2*x1*x7 + 2*x2*x8 + 2*x3*x9 - x7, 2*x4*x5 + 2*x3*x6 + 2*x2*x7 + 2*x1*x8 + 2*x2*x9 - x8]; H:=gbasis(kat9,[x1,x2,x3,x4,x5,x6,x7,x8,x9])
Process 43866 stopped
* thread #9, stop reason = EXC_BAD_ACCESS (code=1, address=0x11b800000) 1, x1^2 + 2*x2^2 + 2*x3^2 + 2*x4^2 + 2*x5^2 + 2*x6^2 + 2*x7^2 + 2*x8^2 + 2*x9^2 - x1, 2*x1*x2 + 2*x2*x3 + 2*x3*x4 + 2*x4*x5 + 2*x5*x6 + 2*x frame #0: 0x000000010253234c libgiac.0.dylib`void giac::zmakelinesplit<giac::tdeg_t14>(giac::zpolymod<giac::tdeg_t14> const&, giac::tdeg_t14 const*, std::__1::vector<giac::tdeg_t14, std::__1::allocator<giac::tdeg_t14>> const&, void*, std::__1::vector<int, std::__1::allocator<int>> const&, std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>&, std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>*, int) [inlined] giac::operator==(x=0x000000011b800000, y=0x0000000170253a30) at cocoa.cc:16304:12 [opt]
16301 #ifdef INT128
16302 return * (const uint128_t *) &x == * (uint128_t *) &y;
16303 #else
-> 16304 return ((longlong *) x.tab)[0] == ((longlong *) y.tab)[0] && ((longlong *) x.tab)[1] == ((longlong *) y.tab)[1];
16305 #endif
16306 }
16307 inline bool operator != (const tdeg_t14 & x,const tdeg_t14 & y){
Target 0: (giac) stopped.
warning: libgiac.0.dylib was compiled with optimization - stepping may behave oddly; variables may not be available.
(lldb) print x.tab
error: Couldn't apply expression side effects : Couldn't dematerialize a result variable: couldn't read its memory
(lldb) print x
(const giac::tdeg_t14 &) 0x000000011b800000: {
= {
tab = ""
= {
tdeg = <read memory from 0x11b800000 failed (0 of 1 bytes read)>
tdeg2 = <read memory from 0x11b800001 failed (0 of 1 bytes read)>
order_ = (o = <read memory from 0x11b800002 failed (0 of 2 bytes read)>, dim = <read memory from 0x11b800004 failed (0 of 1 bytes read)>, lex = <read memory from 0x11b800005 failed (0 of 1 bytes read)>)
ui = <read memory from 0x11b800008 failed (0 of 8 bytes read)>
}
}
}
(lldb) print y
(const giac::tdeg_t14 &) 0x0000000170253a30: {
= {
tab = "\U00000003\0\0\0\0\0\U00000001\0\0\0\0\0\0\0\0\U00000002"
= {
tdeg = '\x03'
tdeg2 = '\0'
order_ = (o = 0, dim = '\0', lex = '\0')
ui = 0x0200000000000000
}
}
}
(lldb) up
frame #1: 0x000000010253234c libgiac.0.dylib`void giac::zmakelinesplit<giac::tdeg_t14>(p=0x000000011a808258, shiftptr=0x000000011a80f1d0, R=size=708, Rhashptr=<unavailable>, Rdegpos=size=6, v=size=3, prevline=<unavailable>, start=0) at cocoa.cc:10956:11 [opt]
10953 }
10954 }
10955 for (;jt!=jtend;++jt){
-> 10956 if (*jt==u){
10957 pushsplit(v,pos,int(jt-Rbegin));
10958 ++jt;
10959 break;
It seems your source code is not synchronized with mine, so it's hard to find some useful information here, most probably the x variable refers to a non existent address, and the y variable itself is suspect (dimension 0). Moreover since there are optimizations in the data structure, printing variables is not very informative for the type of x and y. I have a gdb macro in my .gdbinit file
echo Defining v as print command for giac types\n
set print repeats 0
define v
print ($arg0).dbgprint()
end
if it applies to lldb as well, then you can type v varname instead of p varname. Otherwise p varname.dbgprint() will display a monomial power in a more informative way. But it's probably best to wait next week, I'll check with my own compilation of giac on macos and debug it myself if it fails for me too. BTW, my binary distribution of Giac/Xcas for MacOS is available here if you want to check before : https://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/xcas_mac.dmg.gz
I've just tried on my office mac with icas kat9:=[x1 + 2x2 + 2x3 + 2x4 + 2x5 + 2x6 + 2x7 + 2x8 + 2x9 - 1, x1^2 + 2x2^2 + 2x3^2 + 2x4^2 + 2x5^2 + 2x6^2 + 2x7^2 + 2x8^2 + 2x9^2 - x1, 2x1x2 + 2x2x3 + 2x3x4 + 2x4x5 + 2x5x6 + 2x6x7 + 2x7x8 + 2x8x9 - x2, x2^2 + 2x1x3 + 2x2x4 + 2x3x5 + 2x4x6 + 2x5x7 + 2x6x8 + 2x7x9 - x3, 2x2x3 + 2x1x4 + 2x2x5 + 2x3x6 + 2x4x7 + 2x5x8 + 2x6x9 - x4, x3^2 + 2x2x4 + 2x1x5 + 2x2x6 + 2x3x7 + 2x4x8 + 2x5x9 - x5, 2x3x4 + 2x2x5 + 2x1x6 + 2x2x7 + 2x3x8 + 2x4x9 - x6, x4^2 + 2x3x5 + 2x2x6 + 2x1x7 + 2x2x8 + 2x3x9 - x7, 2x4x5 + 2x3x6 + 2x2x7 + 2x1x8 + 2x2x9 - x8]; H:=gbasis(kat9,[x1,x2,x3,x4,x5,x6,x7,x8,x9]) and could not reproduce a segfault, size(H) returns 143.
My guess is that there is probably a configuration issue. My config.h was generated by ./configure with CXXFLAGS defined in the shell script mkosx from giac-1.9.0 directory, using libraries from brew installed in opt for arm64 architecture: (export CXXFLAGS='-std=c++11 -I/opt/homebrew/include -I/opt/homebrew/Cellar/fltk/1.3.9/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/jpeg/include -I/Applications/usr/include/ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -fPIC -g -O2'). You can find more details about how I compile for Mac here https://xcas.univ-grenoble-alpes.fr/forum/viewtopic.php?f=8&t=2909
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Replace GMP by libbf */
/* #undef BF2GMP */
/* Define if <unordered_map> header is available */
#define C11_UNORDERED_MAP 1
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
/* #undef CRAY_STACKSEG_END */
/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */
/* Set if debugging is enabled */
#define DEBUG_SUPPORT /**/
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#define ENABLE_NLS 1
/* Define if <ext/hash_map> header is available */
#define EXT_HASH_MAP 1
/* Define if <hash_map> header is aviailable */
/* #undef HASH_MAP */
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#define HAVE_ALLOCA_H 1
/* Define to 1 if you have the <argz.h> header file. */
/* #undef HAVE_ARGZ_H */
/* Define to 1 if you have the `asprintf' function. */
#define HAVE_ASPRINTF 1
/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
/* #undef HAVE_CFLOCALECOPYCURRENT */
/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#define HAVE_DCGETTEXT 1
/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
don't. */
#define HAVE_DECL_FEOF_UNLOCKED 1
/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FGETS_UNLOCKED 0
/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
don't. */
#define HAVE_DECL_GETC_UNLOCKED 1
/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
don't. */
#define HAVE_DECL__SNPRINTF 0
/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
don't. */
#define HAVE_DECL__SNWPRINTF 0
/* Define to 1 if you have the <dfu_lib.h> header file. */
/* #undef HAVE_DFU_LIB_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <FL/Fl.H> header file. */
#define HAVE_FL_FL_H 1
/* Define to 1 if you have the `fwprintf' function. */
#define HAVE_FWPRINTF 1
/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1
/* Define to 1 if you have the `getegid' function. */
#define HAVE_GETEGID 1
/* Define to 1 if you have the `geteuid' function. */
#define HAVE_GETEUID 1
/* Define to 1 if you have the `getgid' function. */
#define HAVE_GETGID 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getpid' function. */
#define HAVE_GETPID 1
/* Define to 1 if you have the `getpwuid' function. */
#define HAVE_GETPWUID 1
/* Define if the GNU gettext() function is already present or preinstalled. */
#define HAVE_GETTEXT 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <gmpxx.h> header file. */
#define HAVE_GMPXX_H 1
/* Define to 1 if you have the <gmp.h> header file. */
#define HAVE_GMP_H 1
/* Define to 1 if you have the <gsl/gsl_blas.h> header file. */
#define HAVE_GSL_GSL_BLAS_H 1
/* Define to 1 if you have the <gsl/gsl_eigen.h> header file. */
#define HAVE_GSL_GSL_EIGEN_H 1
/* Define if you have the iconv() function. */
#define HAVE_ICONV 1
/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
#define HAVE_INTMAX_T 1
/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
#define HAVE_INTTYPES_H 1
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
declares uintmax_t. */
#define HAVE_INTTYPES_H_WITH_UINTMAX 1
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#define HAVE_LANGINFO_CODESET 1
/* Define if your <locale.h> file defines LC_MESSAGES. */
#define HAVE_LC_MESSAGES 1
/* Define to 1 if you have the `ao' library (-lao). */
#define HAVE_LIBAO 1
/* Define to 1 if you have the `bernmm' library (-lbernmm). */
/* #undef HAVE_LIBBERNMM */
/* Define to 1 if you have the `blas' library (-lblas). */
#define HAVE_LIBBLAS 1
/* Define to 1 if you have the `cliquer' library (-lcliquer). */
/* #undef HAVE_LIBCLIQUER */
/* Define to 1 if you have the `cocoa' library (-lcocoa). */
/* #undef HAVE_LIBCOCOA */
/* Define to 1 if you have the `curl' library (-lcurl). */
#define HAVE_LIBCURL 1
/* Define to 1 if you have the `dfu' library (-ldfu). */
/* #undef HAVE_LIBDFU */
/* Define to 1 if you have the `dl' library (-ldl). */
#define HAVE_LIBDL 1
/* Define to 1 if you have the `ecm' library (-lecm). */
/* #undef HAVE_LIBECM */
/* Define to 1 if you have the `fltk' library (-lfltk). */
#define HAVE_LIBFLTK 1
/* Define to 1 if you have the `fltk_gl' library (-lfltk_gl). */
#define HAVE_LIBFLTK_GL 1
/* Define to 1 if you have the `fltk_images' library (-lfltk_images). */
#define HAVE_LIBFLTK_IMAGES 1
/* Define to 1 if you have the `fltk_jpeg' library (-lfltk_jpeg). */
/* #undef HAVE_LIBFLTK_JPEG */
/* Now defined if fltk is available */
/* #undef HAVE_LIBFLVW */
/* Define to 1 if you have the `fontconfig' library (-lfontconfig). */
#define HAVE_LIBFONTCONFIG 1
/* Define to 1 if you have the `gc' library (-lgc). */
/* #undef HAVE_LIBGC */
/* Define to 1 if you have the `gfortran' library (-lgfortran). */
/* #undef HAVE_LIBGFORTRAN */
/* Define to 1 if you have the `GL' library (-lGL). */
/* #undef HAVE_LIBGL */
/* Define to 1 if you have the `glpk' library (-lglpk). */
#define HAVE_LIBGLPK 1
/* Define to 1 if you have the `gmp' library (-lgmp). */
#define HAVE_LIBGMP 1
/* Define to 1 if you have the `gmpxx' library (-lgmpxx). */
#define HAVE_LIBGMPXX 1
/* Define to 1 if you have the `gsl' library (-lgsl). */
#define HAVE_LIBGSL 1
/* Define to 1 if you have the `gslcblas' library (-lgslcblas). */
#define HAVE_LIBGSLCBLAS 1
/* Define to 1 if you have the `intl' library (-lintl). */
#define HAVE_LIBINTL 1
/* Define to 1 if you have the `intl.dll' library (-lintl.dll). */
/* #undef HAVE_LIBINTL_DLL */
/* Define to 1 if you have the `jpeg' library (-ljpeg). */
#define HAVE_LIBJPEG 1
/* Define to 1 if you have the `lapack' library (-llapack). */
#define HAVE_LIBLAPACK 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mpfi' library (-lmpfi). */
#define HAVE_LIBMPFI 1
/* Define to 1 if you have the `mpfr' library (-lmpfr). */
#define HAVE_LIBMPFR 1
/* Define to 1 if you have the `mps' library (-lmps). */
/* #undef HAVE_LIBMPS */
/* Define to 1 if you have the `nauty' library (-lnauty). */
#define HAVE_LIBNAUTY 1
/* Define to 1 if you have the `ntl' library (-lntl). */
/* #undef HAVE_LIBNTL */
/* Define to 1 if you have the `pari' library (-lpari). */
#define HAVE_LIBPARI 1
/* Define to 1 if you have the `png' library (-lpng). */
#define HAVE_LIBPNG 1
/* Define to 1 if you have the `pthread' library (-lpthread). */
#define HAVE_LIBPTHREAD 1
/* Define to 1 if you have the `readline' library (-lreadline). */
#define HAVE_LIBREADLINE 1
/* Define to 1 if you have the `rt' library (-lrt). */
/* #undef HAVE_LIBRT */
/* Define to 1 if you have the `samplerate' library (-lsamplerate). */
#define HAVE_LIBSAMPLERATE 1
/* Define to 1 if you have the `tommath' library (-ltommath). */
/* #undef HAVE_LIBTOMMATH */
/* Define to 1 if you have the `usb-1.0' library (-lusb-1.0). */
#define HAVE_LIBUSB_1_0 1
/* Define to 1 if you have the `X11' library (-lX11). */
#define HAVE_LIBX11 1
/* Define to 1 if you have the `Xcursor' library (-lXcursor). */
#define HAVE_LIBXCURSOR 1
/* Define to 1 if you have the `Xext' library (-lXext). */
#define HAVE_LIBXEXT 1
/* Define to 1 if you have the `Xfixes' library (-lXfixes). */
#define HAVE_LIBXFIXES 1
/* Define to 1 if you have the `Xft' library (-lXft). */
#define HAVE_LIBXFT 1
/* Define to 1 if you have the `Xinerama' library (-lXinerama). */
#define HAVE_LIBXINERAMA 1
/* Define to 1 if you have the `Xrender' library (-lXrender). */
#define HAVE_LIBXRENDER 1
/* Define to 1 if you have the `z' library (-lz). */
#define HAVE_LIBZ 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the 'long double' type. */
#define HAVE_LONG_DOUBLE 1
/* Define if you have the 'long long' type. */
#define HAVE_LONG_LONG 1
/* Define to 1 if you have the `mallinfo' function. */
/* #undef HAVE_MALLINFO */
/* Define to 1 if you have the <malloc.h> header file. */
/* #undef HAVE_MALLOC_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mempcpy' function. */
/* #undef HAVE_MEMPCPY */
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <mpfi.h> header file. */
#define HAVE_MPFI_H 1
/* Define to 1 if you have the <mpfr.h> header file. */
#define HAVE_MPFR_H 1
/* Define to 1 if you have the `mpfr_set_str_raw' function. */
/* #undef HAVE_MPFR_SET_STR_RAW */
/* Define to 1 if you have the <mps/mps.h> header file. */
/* #undef HAVE_MPS_MPS_H */
/* Define to 1 if you have the `munmap' function. */
#define HAVE_MUNMAP 1
/* Define to 1 if you have the <nauty/naututil.h> header file. */
#define HAVE_NAUTY_NAUTUTIL_H 1
/* Define to 1 if you have the <nl_types.h> header file. */
#define HAVE_NL_TYPES_H 1
/* Set if getcwd() function is NOT available */
/* #undef HAVE_NO_CWD */
/* Set if getpwuid() function is NOT available */
/* #undef HAVE_NO_HOME_DIRECTORY */
/* Set if pwd.h is NOT available */
/* #undef HAVE_NO_PWD_H */
/* Set if getpid() function is NOT available */
/* #undef HAVE_NO_SIGNAL_H */
/* Set if system() function is NOT available */
/* #undef HAVE_NO_SYSTEM */
/* Set if <sys/resource.h> is NOT available */
/* #undef HAVE_NO_SYS_RESOURCE_WAIT_H */
/* Set if <sys/times.h> is NOT available */
/* #undef HAVE_NO_SYS_TIMES_H */
/* Define to 1 if you have the <pari/pari.h> header file. */
#define HAVE_PARI_PARI_H 1
/* Define to 1 if you have the <png.h> header file. */
#define HAVE_PNG_H 1
/* Define if your printf() function supports format strings with positions. */
#define HAVE_POSIX_PRINTF 1
/* Define to 1 if you have the <pthread.h> header file. */
#define HAVE_PTHREAD_H 1
/* Define to 1 if you have the `putenv' function. */
#define HAVE_PUTENV 1
/* Define to 1 if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* Define to 1 if you have the <readline/history.h> header file. */
#define HAVE_READLINE_HISTORY_H 1
/* Define to 1 if you have the <readline/readline.h> header file. */
#define HAVE_READLINE_READLINE_H 1
/* Define to 1 if you have the <regex> header file. */
#define HAVE_REGEX 1
/* Define to 1 if you have the `setenv' function. */
#define HAVE_SETENV 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
/* Set to enable semi-classical routines */
/* #undef HAVE_SSCL */
/* Define to 1 if you have the <sstream> header file. */
#define HAVE_SSTREAM 1
/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
uintmax_t. */
#define HAVE_STDINT_H_WITH_UINTMAX 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `stpcpy' function. */
#define HAVE_STPCPY 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1
/* Define to 1 if you have the `system' function. */
#define HAVE_SYSTEM 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/times.h> header file. */
#define HAVE_SYS_TIMES_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the `tgammaf' function. */
#define HAVE_TGAMMAF 1
/* Define to 1 if you have the `tgetent' function. */
/* #undef HAVE_TGETENT */
/* Define to 1 if you have the <tommath.h> header file. */
/* #undef HAVE_TOMMATH_H */
/* Define to 1 if you have the `tsearch' function. */
#define HAVE_TSEARCH 1
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
#define HAVE_UINTMAX_T 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the 'unsigned long long' type. */
#define HAVE_UNSIGNED_LONG_LONG 1
/* Define to 1 if you have the <vcl2/vectorclass.h> header file. */
/* #undef HAVE_VCL2_VECTORCLASS_H */
/* Define if you have the 'wchar_t' type. */
#define HAVE_WCHAR_T 1
/* Define to 1 if you have the `wcslen' function. */
#define HAVE_WCSLEN 1
/* Define if you have the 'wint_t' type. */
#define HAVE_WINT_T 1
/* Define to 1 if you have the `__argz_count' function. */
/* #undef HAVE___ARGZ_COUNT */
/* Define to 1 if you have the `__argz_next' function. */
/* #undef HAVE___ARGZ_NEXT */
/* Define to 1 if you have the `__argz_stringify' function. */
/* #undef HAVE___ARGZ_STRINGIFY */
/* Define to 1 if you have the `__fsetlocking' function. */
/* #undef HAVE___FSETLOCKING */
/* Define as const if the declaration of iconv() needs const. */
#define ICONV_CONST
/* Define if integer division by zero raises signal SIGFPE. */
#define INTDIV0_RAISES_SIGFPE 0
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "giac"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "giac"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "giac 1.9.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "giac"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.9.0"
/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
/* #undef PRI_MACROS_BROKEN */
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 8
/* Define as the maximum value of type 'size_t', if the system doesn't define
it. */
/* #undef SIZE_MAX */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if <tr1/unordered_map> header is available */
/* #undef UNORDERED_MAP */
/* Replace GMP by tommath */
/* #undef USE_GMP_REPLACEMENTS */
/* Defined if fltk has OpenGL enabled */
/* #undef USE_OPENGL32 */
/* Version number of package */
#define VERSION "1.9.0"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Define to 1 if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
/* #undef YYTEXT_POINTER */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define as the type of the result of subtracting two pointers, if the system
doesn't define it. */
/* #undef ptrdiff_t */
/* Define to empty if the C compiler doesn't support this keyword. */
/* #undef signed */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to unsigned long or unsigned long long if <stdint.h> and
<inttypes.h> don't define. */
/* #undef uintmax_t */
Steps To Reproduce
Build Sage on macos M2
Expected Behavior
Testsuite should succeed
Actual Behavior
There are a few giac-related segfaults, for example this one in
void giac::zmakelinesplit<giac::tdeg_t14>(giac::zpolymod<giac::tdeg_t14> const&, giac::tdeg_t14 const*, std::__1::vector<giac::tdeg_t14, std::__1::allocator<giac::tdeg_t14> > const&, void*, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<unsigned short, std::__1::allocator<unsigned short> >&, std::__1::vector<unsigned short, std::__1::allocator<unsigned short> >*, int)
:Additional Information
For lack of an upstream bug tracker, will use this one to track the issue
Environment
Checklist
Related issues