mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Question on 2b2c8aafce9d80f9d58652643538f4d58e82b856
@ 2022-10-30  6:29 puwenxu
  2022-10-30 13:11 ` Sam James
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: puwenxu @ 2022-10-30  6:29 UTC (permalink / raw)
  To: musl


[-- Attachment #1.1: Type: text/plain, Size: 843 bytes --]

Dear maintainer,
       I'm using musl 1.2.3.0 now. When I was running some test case codes for musl, I found there may be a problem on modification of 2b2c8aafce9d80f9d58652643538f4d58e82b856.
       As you can see in the picture, this modification assign buf to orig. Then, the orig will be assigned to buf again. If the original value of buf is NULL, the latter value of the buf will be NULL. However, assign out to buf will fail if buf is NULL.
       [cid:image001.png@01D8EC6C.12AE8540]
       I have written a simple file to verification my opinion. The test code and output is shown in the following picture. I think it may be better to add a check for buf in this situation.
       [cid:image002.png@01D8EC6C.12AE8540]
[cid:image003.png@01D8EC6C.12AE8540]
Looking forward to your reply.



Wish Pu
       OS Kernel Lab


[-- Attachment #1.2: Type: text/html, Size: 4674 bytes --]

[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 100094 bytes --]

[-- Attachment #3: image002.png --]
[-- Type: image/png, Size: 101290 bytes --]

[-- Attachment #4: image003.png --]
[-- Type: image/png, Size: 4073 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [musl] Question on 2b2c8aafce9d80f9d58652643538f4d58e82b856
@ 2022-10-31 15:41 puwenxu
  2022-10-31 17:25 ` Rich Felker
  0 siblings, 1 reply; 6+ messages in thread
From: puwenxu @ 2022-10-31 15:41 UTC (permalink / raw)
  To: musl


[-- Attachment #1.1: Type: text/plain, Size: 505 bytes --]

Dear maintainer,
       I'm sorry for my last question firstly.
       I'm not sure whether I have right to show you full test codes because the discipline of my company is strict at it. The error occurs when the test case is running the following code.
err = msgctl(msqid, IPC_STAT, NULL);
       As you can see, the parameter buf is NULL. In this situation, the orig in msgctl will be NULL, and then cause the problem I described last time.
    [cid:image003.png@01D8ED82.534EBC70]


Wish Pu


[-- Attachment #1.2: Type: text/html, Size: 3394 bytes --]

[-- Attachment #2: image003.png --]
[-- Type: image/png, Size: 133604 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-31 17:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-30  6:29 [musl] Question on 2b2c8aafce9d80f9d58652643538f4d58e82b856 puwenxu
2022-10-30 13:11 ` Sam James
2022-10-30 14:31 ` Rich Felker
2022-10-30 17:11 ` Markus Wichmann
2022-10-31 15:41 puwenxu
2022-10-31 17:25 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).