| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | Jeremy Evans <code(at)jeremyevans(dot)net>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables |
| Date: | 2018-09-08 11:56:23 |
| Message-ID: | 16558.1536407783@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Michael Paquier <michael(at)paquier(dot)xyz> writes:
> On Fri, Sep 07, 2018 at 04:18:55PM -0400, Tom Lane wrote:
>> I had been studying that when the report first arrived. I'm not really
>> happy with the coding in pg_saslprep(): it leaves garbage in its output
>> parameter in some code paths, and I think it leaks memory in others.
> Agreed. Do you want to give it a go? I can see some of those code
> paths? Likely you spotted more.
Looking closer, there are no leaks, though I think we could use a comment
about that. And it still makes me itch that pg_saslprep (mostly) doesn't
worry about clearing *output on failure while only three of its four
callers bother to initialize their variables to null. That's a recipe
for future bugs. So I propose the attached cleanup.
We're still no closer to an explanation of Jeremy's failure, though
I'm now pretty sure that pg_saslprep itself isn't the issue.
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| make-pg-saslprep-more-bulletproof.patch | text/x-diff | 2.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2018-09-08 12:34:15 | Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables |
| Previous Message | Tom Lane | 2018-09-08 11:11:30 | Re: BUG #15372: pg_stat_statements extension ignore stats_temp_directory setting and always write into pg_stat_tmp |