Menu

#1266 qualify() BIF Crashes Interpreter

5.0.0
closed
Erich
None
none
1
2023-01-01
2014-06-11
Erich
No

When called with no argument, the qualify() built-in function crashes the ooRexx interpreter.

say qualify()

(On Windows) qualify() BIF and (Stream) method will also return strange results without error indication, when Name is either the empty string or the total length of the current directory plus the length of name exceeds 260 characters

say .stream~new('')~qualify            -- returns empty string w/o current directory
C:\Subdirectory>say qualify('x'~copies(250))   -- returns Name w/o current directory

REXX-ooRexx_4.2.0(MT)_64-bit 6.04 22 Feb 2014
Windows 7

Related

Bugs: #1515

Discussion

  • Moritz Hoffmann

    Moritz Hoffmann - 2014-06-11
    • status: open --> accepted
    • assigned_to: Moritz Hoffmann
    • Pending work items: none --> tests
     
  • Moritz Hoffmann

    Moritz Hoffmann - 2014-06-11

    Committed revision 10171.

     
  • Rick McGuire

    Rick McGuire - 2014-10-09
    • status: accepted --> pending
    • Group: v4.2.0 --> 5.0.0
     
  • Erich

    Erich - 2016-10-09
    • status: pending --> open
    • assigned_to: Moritz Hoffmann --> Erich
    • Pending work items: tests --> code+test
     
  • Erich

    Erich - 2016-10-09

    The no-args crash is fixed. The two other reported issues still need to be addressed.

     
  • Erich

    Erich - 2016-10-10
    • status: open --> pending
    • Pending work items: code+test --> none
     
  • Erich

    Erich - 2016-10-10

    Fixed code with revision [r11173] - this also fixes the issues reported in [bugs:1408]
    Added tests with revision [r11174]

     

    Related

    Commit: [r11173]
    Commit: [r11174]

  • Anonymous

    Anonymous - 2022-07-24

    I see the 2nd problem still failing on v5.0.0 (r12488) (Windows 64-bit, oRexx 32-bit).

    Run this to reproduce:

    rc = directory('c:\')
    do i = 250 to 270
       fn = 'x'~copies(i)
       say i qualify(fn)~length qualify(fn)
    end
    
     
  • Erich

    Erich - 2022-07-24

    This works exactly as it should. Maximum path length on Windows is 259.

     
  • Rony G. Flatscher

    • Status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB