Re: pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-07-11 Thread Tom Lane
Amul Sul writes: > On Fri, Jun 28, 2024 at 12:14 AM Tom Lane wrote: >> Rather than fixing this by adding pstrdup() overhead to every >> elog/ereport sequence, let's fix it by copying the risky pointers >> in CopyErrorData(). That solves it for _SPI_commit/_SPI_rollback >> because they use that f

Re: pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-07-11 Thread Amul Sul
On Fri, Jun 28, 2024 at 12:14 AM Tom Lane wrote: > > Avoid crashing when a JIT-inlined backend function throws an error. > > errfinish() assumes that the __FUNC__ and __FILE__ arguments it's > passed are compile-time constant strings that can just be pointed > to rather than physically copied. Ho

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those