Fix crashes with flint 3.3#87
Conversation
In flint 3.3, gr_mat_struct replaced the `rows` array with row stride [1], update hmod_mat_struct accordingly.
Also, in that case we can use upstream's nmod_mat_entry macro, which doesn't do any type checking.
Fixes JohnCremona#86
[1] flintlib/flint@25251b8
|
Thanks for finding and fixing this. I have been away and will check it out tomorrow |
|
When I build eclib using this patch and flint-3.3 I get a segfault in tests/smattest1, specifically in line 1393 of libsrc/mat.cc. NB smattest1 has scalar=32-bit int. |
That's the crash I get without patching and that this PR is supposed to fix - so it looks like some other code path needs to be fixed too. I can't reproduce it locally though, all tests pass for me. |
|
Thankss for the quick response. Let me check what I am doing after 12 days of holiday... |
|
I cannot understand what is happening. The code in flinterface.h was written by Fredrik and relies on knowledge of FLINT internals which I do not have, and which have changed. But the mystery is why it works for you and for github but not for me (ubuntu 24.04.2 LTS, gcc 13.3.0). --OK I now see that despite rebuilding from scratch, the executables in tests/ are being linked with an older flint lib (/usr/local/lib/libflint.so.18) not the newly installed one /usr/local/lib/libflint.so.21.0.0. I don't know why, I did make distclean and ./configure after installing the new flint system-wide. |
|
Now when I rebuild eclib after putting --with-flint=/usr/local on the ./configure line, it works fine though ldd shows that the executables are still linked to the old libflint.so.18. So this is better but I am still not actually testing the new eclib code with the new flint. I will try deleting the older libflint completely and building again. |
|
All OK, sorry about the noise. |
In flint 3.3, gr_mat_struct replaced the
rowsarray with row stride [1], update hmod_mat_struct accordingly.Also, in that case we can use upstream's nmod_mat_entry macro, which doesn't do any type checking.
Fixes #86
[1] flintlib/flint@25251b8