bugGNU Octave - Bugs: bug #65543, is_valid_file_id false for...

 
 

bug #65543: is_valid_file_id false for tmpfile()

Submitter:  J.J. Green <jjg>
Submitted:  Sun 31 Mar 2024 07:46:47 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 6.4.0 Operating System:  * GNU/Linux
Fixed Release:  8.4.0 Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Mon 01 Apr 2024 05:21:48 PM UTC, comment #5: 

Setting Fixed Release to 8.4.  Marking bug as Fixed and closing report.

Closed bug reports remain searchable and can be re-opened if necessary, or more likely a new report filed with additional specific details (such as failing on a particular O/S).

In addition, I added a BIST test for this bug report to is_valid_file_id.m to prevent a future change that might re-create the original bad behavior.  See https://hg.savann ... /rev/aacbcf3cbc6a

Rik <rik5>
Group administrator
Mon 01 Apr 2024 09:26:46 AM UTC, comment #4: 

The point I am making is that the bug seems to have been fixed on Linux in v8+, which might be useful information for someone who comes across the same issue while running v7 (as is stock on Debian stable for example).

You mentioned "fixed in 9.1", but did not say on which OS.  It could have been the case that you have a Mac and the issue never occurred on Macs due a different libc, but was still present in v9.1 on Linux,  My previous comment says that this doe not seem to be the case.

J.J. Green <jjg>
Mon 01 Apr 2024 01:55:50 AM UTC, comment #3: 

I am not sure what is the point you trying to make.
Octave is a single-string development; if the bug is fixed in a current release, the bug is fixed. There will be no bug-fixes for 6.x, 7.x, or 8.x anymore since 9.1 is released.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 31 Mar 2024 11:16:36 PM UTC, comment #2: 

I have a package where run CI against various official Octave images, so tacked on a "phony test" (it assert nothing) which runs


function test_tmpfile_is_valid_file_id
  "check tmpfile() valid"
  fd = tmpfile()
  is_valid_file_id(fd)
  freport()
  fclose(fd)
endfunction


That finds that the issue is present on 6.4 and 7.3, but not on 8.4 (latest).  See at the end of the corresponding job output here: https://gitlab.co ... elines/1234877706

J.J. Green <jjg>
Sun 31 Mar 2024 07:52:37 PM UTC, comment #1: 

Octave 6.4 is old.
The command seems to work fine in current octave


octave:3> fid = tmpfile()
fid = 19
octave:4> is_valid_file_id (fid)
ans = 1
octave:5> freport

  number  mode  arch       name
  ------  ----  ----       ----
     0     r    ieee-le    stdin
     1     w    ieee-le    stdout
     2     w    ieee-le    stderr
    19     w+b  ieee-le    /tmp/oct-205guf


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 31 Mar 2024 07:46:47 PM UTC, original submission:  

Just that really:

octave:1> fid = tmpfile()
fid = 15
octave:2> is_valid_file_id(fid)
ans = 0
octave:3> freport()

  number  mode  arch       name
  ------  ----  ----       ----
     0     r    ieee-le    stdin
     1     w    ieee-le    stdout
     2     w    ieee-le    stderr
    15     w+b  ieee-le

I guess because the filename is empty ...

J.J. Green <jjg>

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 16MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by jjg (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    History

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-04-01 rik5 Item GroupNone Incorrect Result
        StatusNone Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 8.4.0

    Back to the top

    Powered by Savane 3.16.
    Corresponding source code