This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, libgomp] Fix segfault with plugin-hsa


Hi,

On Wed, Sep 11 2019, Jakub Jelinek wrote:
> On Wed, Sep 11, 2019 at 11:30:17AM +0200, Tobias Burnus wrote:
>> when playing around with offloading, I got an hsa initialization error
>> (/dev/... lacked write permission) and the library call returned with an
>> error status – but hsa_fns.hsa_status_string_fn didn't set the message to
>> the string variable.
>> 
>> Hence, the string variable was uninitialized and libgomp crashed when
>> printing the error message; "[unknown]" is not the best HSA run-time
>> message, but at least the primary message is shown and there is no crash :-)
>
> LGTM, but give Martin (CCed) as the author a chance to chime in.

Looks good to me too.  Thanks.

Martin

>
>> 2019-09-11  Tobias Burnus  <tobias@codesourcery.com>
>> 
>>         * plugin/plugin-hsa.c (hsa_warn, hsa_fatal, hsa_error): Ensure
>>         string is initialized.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]