Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when REPL tries to print value of type Posix.FileSys.ST.stat #67

Closed
1 of 5 tasks
JohnReppy opened this issue Jul 15, 2022 · 0 comments
Closed
1 of 5 tasks
Assignees
Labels
basis-lib problem with Standard ML Basis library bug Something isn't working fixed-in-110.99.3 issues that will be fixed in the 110.99.3 version gforge bug (or feature request) ported from smlnj-gforge repository

Comments

@JohnReppy
Copy link
Contributor

JohnReppy commented Jul 15, 2022

Version

110.99.2

Operating System

  • All
  • Linux
  • macOS
  • Windows
  • Other Unix

OS Version

No response

Processor

No response

Component

Basis Library

Severity

Major

Description of the problem

When using SML/NJ interactively, the SML/NJ REPL shows an error whenever there is a result of type Posix.FileSys.ST.stat.

For example, when evaluating Posix.FileSys.stat "/etc/passwd";

Standard ML of New Jersey (64-bit) v110.99.2 [built: Thu Jan 23 12:34:56 2022]
- Posix.FileSys.stat "/etc/passwd";
[autoloading]
[library $SMLNJ-BASIS/basis.cm is stable]
[library $SMLNJ-BASIS/(basis.cm):basis-common.cm is stable]
[autoloading done]
val it =
  ST
    {atime=TIME {usec=1652879341508064},ctime=TIME {usec=1647945818121959},

unexpected exception (bug?) in SML/NJ: Representation [Representation]
  raised at: Basis/Implementation/Unsafe/target64-object.sml:111.19-111.33
             ../compiler/TopLevel/print/ppobj.sml:85.45
             ../compiler/TopLevel/print/ppobj.sml:373.24
             ../compiler/TopLevel/print/ppobj.sml:373.24
             ../compiler/TopLevel/print/ppobj.sml:373.24
             ../compiler/TopLevel/interact/evalloop.sml:45.54
-

Transcript

No response

Expected Behavior

No response

Steps to Reproduce

No response

Additional Information

No response

Email address

No response

Comments from smlnj-gforge

Original smlnj-gforge bug number 310

Submitted on 2022-05-19 at 09:48:00

comment by @JohnReppy on 2022-05-20 14:20:00 +000 UTC

The issue seems to be with the dev field of the stat record.

- Posix.FileSys.ST.dev(Posix.FileSys.stat "/etc/passwd");

unexpected exception (bug?) in SML/NJ: Representation [Representation]
  raised at: Basis/Implementation/Unsafe/target64-object.sml:111.19-111.33
             ../compiler/TopLevel/print/ppobj.sml:85.45
             ../compiler/TopLevel/print/ppobj.sml:373.24
             ../compiler/TopLevel/interact/evalloop.sml:45.54

This field is represented as a singleton data constructor that wraps a Word64.word value.

comment by @JohnReppy on 2022-05-20 14:30:00 +000 UTC

Fixed for 2022.1 and 110.99.3. The fix is was to the isUbxTy function in the ppobj.sml file.

@JohnReppy JohnReppy added basis-lib problem with Standard ML Basis library bug Something isn't working gforge bug (or feature request) ported from smlnj-gforge repository labels Jul 15, 2022
@JohnReppy JohnReppy self-assigned this Jul 15, 2022
@JohnReppy JohnReppy added the fixed-in-110.99.3 issues that will be fixed in the 110.99.3 version label Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
basis-lib problem with Standard ML Basis library bug Something isn't working fixed-in-110.99.3 issues that will be fixed in the 110.99.3 version gforge bug (or feature request) ported from smlnj-gforge repository
Projects
None yet
Development

No branches or pull requests

1 participant