Menu

#1840 lineout for very long lines is broken

5.0.0
closed
Erich
None
none
1
2025-05-02
2022-09-07
Erich
No

lineout is broken for line lengths above 2 GB on Windows and Linux.

On Windows _ write() only supports int (which is 32-bit even on 64-bit Windows) line lengths.
On Linux write() only supports line lengths up to 0x7ffff000.
On other Unix-like OSs (e. g. Solaris) write() may support full 64-bit lengths.

Lines longer than the native limits should be written chunked.

Related

Bugs: #1840

Discussion

  • Erich

    Erich - 2022-09-07

    Committed Windows code fix with revision [r12508]

     

    Related

    Commit: [r12508]

  • Erich

    Erich - 2022-09-12

    Committed Unix code fix with revision [r12512]

     

    Related

    Commit: [r12512]

  • Erich

    Erich - 2022-09-12

    Can someone try to run this on any Linux/Unix system, please?
    This runs fine for me on Windows, but I couldn't find a Linux/Unix VMs in our build system with enough resources.

    numeric digits 18
    
    s = .Stream~new("TstLineOutLarge")
    
    do e = 30 to 33
      n = 2 ** e
      do m = n - 3 to n + 1
        s~open("write replace")
        say e m s~description s~lineOut(""~left(m)) s~description,
          s~chars "delta" (m - s~chars + .endofline~length)
        s~close
      end
    end
    
     
    • Per Olov Jonsson

      I can give you the resources temporarily on one VM, up to 80-90 GB memory (or 40) depending on which machine. What VMs can you use?

      I am in the RexxLA symposium so I may be responding sluggishly but I will monitor my mail

      Hälsningar/Regards/Grüsse,
      P.O. Jonsson
      oorexx@jonases.se

      Am 12.09.2022 um 19:12 schrieb Erich erich_st@users.sourceforge.net:

      Can someone try to run this on any Linux/Unix system, please?
      This runs fine for me on Windows, but I couldn't find a Linux/Unix VMs in our build system with enough resources.

      ~~~
      numeric digits 18

      s = .Stream~new("TstLineOutLarge")

      do e = 30 to 33
      n = 2 ** e
      do m = n - 3 to n + 1
      s~open("write replace")
      say e m s~description s~lineOut(""~left(m)) s~description,
      s~chars "delta" (m - s~chars + .endofline~length)
      s~close
      end
      end
      ~~~


      ** [bugs:#1840] lineout for very long lines is broken**

      Status: accepted
      Group: 5.0.0
      Created: Wed Sep 07, 2022 03:38 PM UTC by Erich
      Last Updated: Mon Sep 12, 2022 04:39 PM UTC
      Owner: Erich

      lineout is broken for line lengths above 2 GB on Windows and Linux.

      On Windows _ write() only supports int (which is 32-bit even on 64-bit Windows) line lengths.
      On Linux write() only supports line lengths up to 0x7ffff000.
      On other Unix-like OSs (e. g. Solaris) write() may support full 64-bit lengths.

      Lines longer than the native limits should be written chunked.


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/oorexx/bugs/1840/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #1840

    • taf

      taf - 2022-09-13

      Crashed my desktop manager (Cinnamon) on Linux Mint 20.3

      taf@taf-K54C:~$ rexx lxtest.rex

      30 1073741821 READY: 0 READY: 1073741822 delta 0

      30 1073741822 READY: 0 READY: 1073741823 delta 0

      30 1073741823 READY: 0 READY: 1073741824 delta 0

      30 1073741824 READY: 0 READY: 1073741825 delta 0

      30 1073741825 READY: 0 READY: 1073741826 delta 0

      31 2147483645 READY: 0 READY: 2147479553 delta 4093

      31 2147483646 READY: 0 READY: 2147479553 delta 4094

      31 2147483647 READY: 0 READY: 2147479553 delta 4095

      31 2147483648 READY: 0 READY: 2147479553 delta 4096

      Killed

      taf@taf-K54C:~$

      On 2022-09-12 10:12, Erich wrote:

      Can someone try to run this on any Linux/Unix system, please?
      This runs fine for me on Windows, but I couldn't find a Linux/Unix VMs
      in our build system with enough resources.

      |numeric digits 18 s = .Stream~new("TstLineOutLarge") do e = 30 to 33
      n = 2 ** e do m = n - 3 to n + 1 s~open("write replace") say e m
      s~description s~lineOut(""~left(m)) s~description, s~chars "delta" (m
      - s~chars + .endofline~length) s~close end end |


      [bugs:#1840] https://sourceforge.net/p/oorexx/bugs/1840/ lineout
      for very long lines is broken

      Status: accepted
      Group: 5.0.0
      Created: Wed Sep 07, 2022 03:38 PM UTC by Erich
      Last Updated: Mon Sep 12, 2022 04:39 PM UTC
      Owner: Erich

      lineout is broken for line lengths above 2 GB on Windows and Linux.

      On Windows _ write() only supports int (which is 32-bit even on 64-bit
      Windows) line lengths.
      On Linux write() only supports line lengths up to 0x7ffff000.
      On other Unix-like OSs (e. g. Solaris) write() may support full 64-bit
      lengths.

      Lines longer than the native limits should be written chunked.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/oorexx/bugs/1840/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #1840

  • Anonymous

    Anonymous - 2022-09-13

    for what is worth
    Open Object Rexx Version 5.0.0 r12512
    Build date: Sep 13 2022
    Addressing mode: 64
    Copyright (c) 1995, 2004 IBM Corporation. All rights reserved.
    Copyright (c) 2005-2022 Rexx Language Association. All rights reserved.
    This program and the accompanying materials are made available under the terms
    of the Common Public License v1.0 which accompanies this distribution or at
    https://www.oorexx.org/license.html

    30 1073741821 READY: 0 READY: 1073741822 delta 0
    30 1073741822 READY: 0 READY: 1073741823 delta 0
    30 1073741823 READY: 0 READY: 1073741824 delta 0
    30 1073741824 READY: 0 READY: 1073741825 delta 0
    30 1073741825 READY: 0 READY: 1073741826 delta 0
    31 2147483645 READY: 0 READY: 2147483646 delta 0
    31 2147483646 READY: 0 READY: 2147483647 delta 0
    31 2147483647 READY: 0 READY: 2147483648 delta 0
    31 2147483648 READY: 0 READY: 2147483649 delta 0
    31 2147483649 READY: 0 READY: 2147483650 delta 0
    32 4294967293 READY: 0 READY: 4294967294 delta 0
    32 4294967294 READY: 0 READY: 4294967295 delta 0
    32 4294967295 READY: 0 READY: 4294967296 delta 0
    32 4294967296 READY: 1 ERROR:25 Inappropriate ioctl for device 0 delta 4294967297
    32 4294967297 READY: 0 READY: 2 delta 4294967296
    33 8589934589 READY: 0 READY: 4294967294 delta 4294967296
    33 8589934590 READY: 0 READY: 4294967295 delta 4294967296
    33 8589934591 READY: 0 READY: 4294967296 delta 4294967296
    33 8589934592 READY: 1 ERROR:25 Inappropriate ioctl for device 0 delta 8589934593
    33 8589934593 READY: 0 READY: 2 delta 8589934592

     
  • Erich

    Erich - 2022-09-18
    • Pending work items: code+test --> tests
     
  • Erich

    Erich - 2022-09-18

    Code fixes committed with revision [r12513]

     

    Related

    Commit: [r12513]

  • Per Olov Jonsson

    • Group: 5.0.0 --> 5.1.0
     
  • Erich

    Erich - 2023-10-28
    • status: accepted --> pending
    • Pending work items: tests --> none
    • Group: 5.1.0 --> 5.0.0
     
  • Erich

    Erich - 2023-10-28

    Code fixes committed with revision [r12513]

     

    Related

    Commit: [r12513]

  • Rony G. Flatscher

    • Status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB