Project

General

Profile

Bug #1626

Bug #1450: Illumos should be buildable with GCC4

libld may accidentally return success while failing

Added by Rich Lowe almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2011-10-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

Description

In two places in the linker we accidentally return succes while trying to fail.

In both ar_extract_bysym and ar_extract_all we return S_ERROR if ar_member_path fails, both of these functions return Boolean which in the linker is an enum of two values (TRUE and FALSE, 0 and 1), with FALSE being failure. Unfortunately S_ERROR is a word-sized ~0, which when liberally interpreted is true, and signifies success.

GCC4 type checks this and complains that ~0 is not a member of the Boolean enum.

History

#1

Updated by Rich Lowe almost 8 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

Resolved in r13489 commit:f2d47c200ef9

Also available in: Atom PDF