General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Anony Mousse
Low Level
comments
Comments by "Anony Mousse" (@anon_y_mousse) on "the truth about ChatGPT generated code" video.
You should post the generated code somewhere and add a link to it in the description. I have a feeling that there's more vulnerabilities in the first example than just a possible buffer exploit, such as not flushing the file buffers possibly causing an issue with subsequent reads, and the most obvious issue which you hinted at but didn't expand on about file permissions. Running as root would give remote access to all the files on the system.
65
@shanehanna No, don't use ChatGPT or any LLM, especially not if you're trying to learn how to program. It isn't a sentient being and will be incapable of finding deep mistakes. It's better to learn from a sentient being which can point out these deep mistakes.
11
@Those_Weirdos Great response. "He had to run it as root", but not if he'd taken either of these two steps I'm enumerating that prove he didn't have to.
9
I would add to what's already been recommended with reading the ISO standard for C, the erratas and the rationale, as well as read both the Intel and AMD optimization manuals as they do include some examples in C. But more importantly, I would also recommend learning assembly at the same time, but not in its entirety at first, rather the subset that your compiler of choice uses. I use gcc, so if you were to use the assembly generation flags to try and understand how it generates code, gcc -masm=intel -o foo.asm -S foo.c is the method you'll want to use. On top of all of that, I would recommend reading the source code for long used open source programs.
4
@heckerhecker8246 Then you need to reread it, but slower. Clearly you haven't finished learning English if you still can't understand it.
2
@heckerhecker8246 Learn English, it'll help you.
1
@heckerhecker8246 Let's try this one more time. It's in his voice and sarcastic. If you don't understand that then there's no hope for you.
1