[PATCH] gcc/jit/jit-recording.cc: recording::global::write_to_dump: Avoid crashes when writing psuedo-C for globals with string initializers.

2022-11-24 Thread Vibhav Pant via Gcc-patches
If a char * global was initialized with a rvalue from `gcc_jit_context_new_string_literal` containing a format string, dumping the context causes libgccjit to SIGSEGV due to an improperly constructed call to vasprintf. The following code snippet can reproduce the crash: int main(int argc, char

Re: [PATCH] libgccjit.h: Make the macro definition for testing gcc_jit_context_new_bitcast correctly available.

2022-07-30 Thread Vibhav Pant via Gcc-patches
I don't have push rights to the repo, so this would need to be applied manually. Thanks, Vibhav On Tue, Jul 26, 2022 at 4:48 AM David Malcolm wrote: > > On Sat, 2022-07-23 at 13:31 +0530, Vibhav Pant via Jit wrote: > > The macro definition for LIBGCCJIT_HAVE_gcc-jit_context_new_bitcast > > was

[PATCH] libgccjit.h: Make the macro definition for testing gcc_jit_context_new_bitcast correctly available.

2022-07-23 Thread Vibhav Pant via Gcc-patches
The macro definition for LIBGCCJIT_HAVE_gcc-jit_context_new_bitcast was earlier located in the documentation comment for gcc_jit_context_new_bitcast, making it unavailable to code that consumed libgccjit.h. This patch moves the definition out of the comment, making it effective. Thanks, Vibhav