This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Check return value for asprintf()
ClosedPublic

Authored by brad on Jan 12 2021, 4:21 PM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Commits
rG1be2524b7d21: [libcxx] Check return value for asprintf()
Summary

Submitting upstream from OpenBSD tree:

local __libcpp_asprintf_l() -> libc asprintf() was inspecting the pointer (with indeterminate value) for failure, rather than the return value of -1.

Diff Detail

Event Timeline

brad created this revision.Jan 12 2021, 4:21 PM
brad requested review of this revision.Jan 12 2021, 4:21 PM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptJan 12 2021, 4:21 PM
ldionne requested changes to this revision.Jan 18 2021, 11:05 AM

Please fix the CI issues and ping again if you'd like to get this reviewed.

This revision now requires changes to proceed.Jan 18 2021, 11:05 AM
brad updated this revision to Diff 317767.Jan 19 2021, 9:20 PM

Fix the comparison between signed and unsigned values.

ldionne accepted this revision.Jan 21 2021, 7:45 AM

LGTM, thanks!

This revision is now accepted and ready to land.Jan 21 2021, 7:45 AM
This revision was automatically updated to reflect the committed changes.