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

APPEND file-port crash #1894

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 0 comments
Closed

APPEND file-port crash #1894

Siskin-Bot opened this issue Feb 15, 2020 · 0 comments

Comments

@Siskin-Bot
Copy link
Collaborator

Siskin-Bot commented Feb 15, 2020

Submitted by: Ladislav

The code below crashes the interpreter

port: open/new %pokus.txt
append port newline

Imported from: CureCode [ Version: alpha 111 Type: Bug Platform: All Category: Ports Reproduce: Always Fixed-in:none ]
Imported from: metaeducation#1894

Comments:

Rebolbot commented on Oct 12, 2011:

Submitted by: BrianH

File ports don't support the APPEND action - you're supposed to use WRITE/append instead, like this:

port: open/new %pokus.txt
write/append port to-string newline  ; You can't write a character without converting it to string or binary first

Still, it shouldn't crash. The relevant code may be in the host source, and if so we can fix it ourselves.


Rebolbot commented on Oct 25, 2011:

Submitted by: Ladislav

in the core-tests suite

Rebolbot commented on Mar 17, 2014:

Submitted by: abolka

Currently, APPEND on a file port! is just a shortcut for WRITE/append. Should we keep that behaviour, or disallow APPEND on file port!s altogether, for now?


Rebolbot commented on Mar 23, 2014:

Submitted by: abolka

Fix for the crash submitted:

rebol/rebol#212

Note that this fix tightens the effective type spec for APPEND on file ports. Disallowing APPEND on file ports altogether should still be discussed. We could also discuss relaxing APPEND on file ports so that it automatically converts to binary for non-binary values.


Rebolbot added on Jan 12, 2016


Hostilefork added on Mar 26, 2018


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants