Project

General

Profile

Actions

Bug #16266

closed

troff: parameter defaults to 'int'

Added by Toomas Soome 12 days ago. Updated 6 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Add missing 'int'. Use vfprintf().

Testing done: wsdiff is reporting binary difference about error function in ta.o and then text difference in program 'ta':

NOTE: ELF .text difference detected.

157,182c157,177
<     error+0x15:    83 c4 04           addl   $0x4,%esp
<     error+0x18:    ff 75 28           pushl  0x28(%ebp)
<     error+0x1b:    ff 75 24           pushl  0x24(%ebp)
<     error+0x1e:    ff 75 20           pushl  0x20(%ebp)
<     error+0x21:    ff 75 1c           pushl  0x1c(%ebp)
<     error+0x24:    ff 75 18           pushl  0x18(%ebp)
<     error+0x27:    ff 75 14           pushl  0x14(%ebp)
<     error+0x2a:    ff 75 10           pushl  0x10(%ebp)
<     error+0x2d:    ff 75 0c           pushl  0xc(%ebp)
<     error+0x30:    68 20 00 00 00     pushl  $0x20
<     error+0x35:    e8 fc ff ff ff     call   -0x4     <error+0x36>
<     error+0x3a:    83 c4 28           addl   $0x28,%esp
<     error+0x3d:    68 0e 00 00 00     pushl  $0xe
<     error+0x42:    68 20 00 00 00     pushl  $0x20
<     error+0x47:    e8 fc ff ff ff     call   -0x4     <error+0x48>
<     error+0x4c:    83 c4 10           addl   $0x10,%esp
<     error+0x4f:    83 7d 08 00        cmpl   $0x0,0x8(%ebp)
<     error+0x53:    75 07              jne    +0x7     <error+0x5c>
<     error+0x55:    b8 00 00 00 00     movl   $0x0,%eax
<     error+0x5a:    c9                 leave  
<     error+0x5b:    c3                 ret    
<     error+0x5c:    83 ec 0c           subl   $0xc,%esp
<     error+0x5f:    6a 01              pushl  $0x1
<     error+0x61:    e8 fc ff ff ff     call   -0x4     <error+0x62>
<     error+0x66:    83 c4 10           addl   $0x10,%esp
<     error+0x69:    eb ea              jmp    -0x16    <error+0x55>
---
>     error+0x15:    8d 45 10           leal   0x10(%ebp),%eax
>     error+0x18:    83 c4 0c           addl   $0xc,%esp
>     error+0x1b:    50                 pushl  %eax
>     error+0x1c:    ff 75 0c           pushl  0xc(%ebp)
>     error+0x1f:    68 20 00 00 00     pushl  $0x20
>     error+0x24:    e8 fc ff ff ff     call   -0x4     <error+0x25>
>     error+0x29:    83 c4 08           addl   $0x8,%esp
>     error+0x2c:    68 0e 00 00 00     pushl  $0xe
>     error+0x31:    68 20 00 00 00     pushl  $0x20
>     error+0x36:    e8 fc ff ff ff     call   -0x4     <error+0x37>
>     error+0x3b:    83 c4 10           addl   $0x10,%esp
>     error+0x3e:    83 7d 08 00        cmpl   $0x0,0x8(%ebp)
>     error+0x42:    75 07              jne    +0x7     <error+0x4b>
>     error+0x44:    b8 00 00 00 00     movl   $0x0,%eax
>     error+0x49:    c9                 leave  
>     error+0x4a:    c3                 ret    
>     error+0x4b:    83 ec 0c           subl   $0xc,%esp
>     error+0x4e:    6a 01              pushl  $0x1
>     error+0x50:    e8 fc ff ff ff     call   -0x4     <error+0x51>
>     error+0x55:    83 c4 10           addl   $0x10,%esp
>     error+0x58:    eb ea              jmp    -0x16    <error+0x44>

Actions #1

Updated by Electric Monk 12 days ago

  • Gerrit CR set to 3282
Actions #2

Updated by Toomas Soome 8 days ago

  • Description updated (diff)
  • Status changed from In Progress to Pending RTI
Actions #3

Updated by Toomas Soome 6 days ago

Toomas Soome wrote:

Add missing 'int'. Use vfprintf().

Testing done: wsdiff is reporting binary difference about error function in ta.o and then text difference in program 'ta':
[...]

Also tested error():

tsoome@omnios:/code/16266/usr/src/cmd/troff/troff.d$ ./ta help
ta: can't open help
tsoome@omnios:/code/16266/usr/src/cmd/troff/troff.d$ 

Actions #4

Updated by Electric Monk 6 days ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 90 to 100

git commit e0dcd5777d9e44d1373002785b840efbaa46e340

commit  e0dcd5777d9e44d1373002785b840efbaa46e340
Author: Toomas Soome <tsoome@me.com>
Date:   2024-02-15T23:37:09.000Z

    16266 troff: parameter defaults to 'int'
    Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
    Reviewed by: Dan Cross <cross@oxidecomputer.com>
    Reviewed by: Peter Tribble <peter.tribble@gmail.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF