Project

General

Profile

Bug #72

_tx_error needs to preserve the errno value it is supposed to display

Added by John Doe about 10 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2010-08-22
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=5054112

Fix is attached. Still need review.

[dep, 27May2004]

_tx_error, called by t_error, is supposed to display a message,
followed by the error string for the error defined in t_errno,
followed by the error string for the error defined in errno. If any
of the system calls/library routines invoked between the start of
_tx_error and when it calls perror() set errno, the output will be
incorrect.

Files

fix5054112.patch (1.26 KB) fix5054112.patch John Doe, 2010-08-22 03:39 AM
fix72.patch (610 Bytes) fix72.patch John Doe, 2010-08-23 11:26 PM

History

#1

Updated by Rob McMahon about 10 years ago

This doesn't look right to me. You're looking up t_strerror of the old errno, and then printing out the user-supplied string again anyway, and the no newline. Surely the lines starting at 58 should be along the lines of
if (local_t_errno == TSYSERR) {
(void) write(2, ": ", 2);
c = strerror(local_errno);
n = strlen(c);
(void) write(2, c, (unsigned)n);
}
(void) write(2, "\n", 1);
Cheers,
Rob

#2

Updated by John Doe about 10 years ago

Added the changed commented by Rob McMahon.

Still need another review.

#3

Updated by John Doe about 10 years ago

  • Assignee set to John Doe
#4

Updated by Gary Mills about 8 years ago

  • Status changed from New to Feedback
  • Assignee changed from John Doe to Gary Mills
  • % Done changed from 100 to 80
  • Difficulty set to Medium
  • Tags set to needs-triage

I've made the minimum changes to resolve the problem noted in this bug report. However, I don't have a way to test this version or to reproduce the problem. Can anyone help with this?

#5

Updated by Rich Lowe about 8 years ago

Resolved in ace0359e9b3ac0b4bb7ddb51ae9138de3df33789

#6

Updated by Rich Lowe about 8 years ago

  • Category set to lib - userland libraries
  • Status changed from Feedback to Resolved
  • % Done changed from 80 to 100
  • Tags deleted (needs-triage)

Also available in: Atom PDF