Code Monkey home page Code Monkey logo

Comments (7)

carloscabanero avatar carloscabanero commented on July 23, 2024

That's an interesting one. Will take a look at what may be provoking the crash.

from blink.

l2dy avatar l2dy commented on July 23, 2024

I thought people won't type weird things and closed #1900. I was wrong.

Screenshot 2024-03-20

Edit: #1900 is not actually relevant, because this is valid UTF-8. The correspondence comes from "weird things typed".

from blink.

fingolfin avatar fingolfin commented on July 23, 2024

Well I did not really input it intentionally, it just happened ;-). Still would be good if that didn't cause a hard crash

from blink.

l2dy avatar l2dy commented on July 23, 2024

No worries. I didn't mean to be harsh about this. I hold the same opinion that a crash or freeze should not happen.

This crash happens inside ios_system and I can reproduce it in a-shell too. I'm having a hard time getting Address Sanitizer to work inside ios_system, but there is some progress.

from blink.

l2dy avatar l2dy commented on July 23, 2024

Passing the string 1E 00 (Ctrl-^) to getLastCharacterOfArgument() returns an invalid pointer 0x1. This needs to be fixed upstream.

Screenshot 2024-03-21

P.S. Address Sanitizer was not needed for this.

from blink.

l2dy avatar l2dy commented on July 23, 2024

@carloscabanero I have a patch for it. It's very unfortunate that ios_system uses ^^ as its internal Record Separator for arguments with both ' and ". The internal ^^ always comes in pairs, except when you put one in the input ;)

diff --git a/ios_system.m b/ios_system.m
index 21e9eeb..87a498b 100644
--- a/ios_system.m
+++ b/ios_system.m
@@ -2459,6 +2459,7 @@ static char* getLastCharacterOfArgument(const char* argument) {
         return NULL;
     } else if (argument[0] == recordSeparator) {
         char* endquote = strchr(argument + 1, recordSeparator);
+        if (endquote == NULL) return NULL; // be safe
         return endquote + 1;
     }
     // TODO: the last character of the argument could also be '<' or '>' (vim does that, with no space after file name)

from blink.

carloscabanero avatar carloscabanero commented on July 23, 2024

Done 17.3.0 . Thanks for the help

from blink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.