[Bug jit/97867] [11 Regression] thunk_info::release breaks function calls in libgccjit

2020-11-30 Thread hubicka at ucw dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97867

--- Comment #8 from Jan Hubicka  ---
> 
> FWIW, did you configure with --enable-host-shared ?  Forgetting to enable that
> is the usual source of weird errors when building libgccjit.

I think it does not let you to build it otherwise, but I believe I did.
I just need to find time to update my setup. It is really out of date.

BTW if you build with LTO, I think there should be no performance
penalty for building libbackend with -fpic since we take it away while
producing the final binary.  This may be relevant for those who build
distros (I suppose you do not want to ship main compilers with PIC build
for performance reasons).

Honza

[Bug jit/97867] [11 Regression] thunk_info::release breaks function calls in libgccjit

2020-11-30 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97867

David Malcolm  changed:

   What|Removed |Added

 CC||dmalcolm at gcc dot gnu.org

--- Comment #7 from David Malcolm  ---
(In reply to Jan Hubicka from comment #6)
> Fixed sorry for taking so long

Thanks for fixing this.


(In reply to Jan Hubicka from comment #4)
> Sorry, I lost track of this, because i still hit the strange linker error
> with building libjit

FWIW, did you configure with --enable-host-shared ?  Forgetting to enable that
is the usual source of weird errors when building libgccjit.

[Bug jit/97867] [11 Regression] thunk_info::release breaks function calls in libgccjit

2020-11-29 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97867

Jan Hubicka  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #6 from Jan Hubicka  ---
Fixed sorry for taking so long

[Bug jit/97867] [11 Regression] thunk_info::release breaks function calls in libgccjit

2020-11-29 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97867

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Jan Hubicka :

https://gcc.gnu.org/g:caea077c17fdf6fe1aa4c350260f25439dfd5066

commit r11-5524-gcaea077c17fdf6fe1aa4c350260f25439dfd5066
Author: Jan Hubicka 
Date:   Sun Nov 29 23:22:24 2020 +0100

Fix freeing of thunk-info

PR jit/97867
* symtab-thunks.h (thunk_info::release): Use ggc_delete.

[Bug jit/97867] [11 Regression] thunk_info::release breaks function calls in libgccjit

2020-11-24 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97867

--- Comment #4 from Jan Hubicka  ---
Sorry, I lost track of this, because i still hit the strange linker error with
building libjit

The following ghsould fix it.
diff --git a/gcc/symtab-thunks.h b/gcc/symtab-thunks.h
index 41a684995b3..0dba2217793 100644
--- a/gcc/symtab-thunks.h
+++ b/gcc/symtab-thunks.h
@@ -167,7 +167,7 @@ inline void
 thunk_info::release ()
 { 
   if (symtab->m_thunks)
-delete (symtab->m_thunks);
+ggc_delete (symtab->m_thunks);
   symtab->m_thunks = NULL;
 }
 #endif  /* GCC_SYMTAB_THUNKS_H  */

[Bug jit/97867] [11 Regression] thunk_info::release breaks function calls in libgccjit

2020-11-24 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97867

David Malcolm  changed:

   What|Removed |Added

Summary|FAIL:   |[11 Regression]
   |test-combination.c.exe  |thunk_info::release breaks
   |test-functions.c.exe|function calls in libgccjit
   |test-pr66779.c.exe  |
   |test-threads.c.exe  killed  |
   Assignee|dmalcolm at gcc dot gnu.org|hubicka at gcc dot 
gnu.org
   Priority|P3  |P1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-11-24
 Ever confirmed|0   |1

--- Comment #3 from David Malcolm  ---
Thanks Martin.

Looks like this is Honza's thunk_info cleanup stuff that I reported on the
list. 

Reassigning, and setting to P1 as this will likely break all non-trivial usage
of libgccjit.