惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
C
Cisco Blogs
P
Privacy & Cybersecurity Law Blog
T
Tor Project blog
Google Online Security Blog
Google Online Security Blog
Scott Helme
Scott Helme
C
Cyber Attacks, Cyber Crime and Cyber Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News and Events Feed by Topic
The Register - Security
The Register - Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
SecWiki News
SecWiki News
T
True Tiger Recordings
T
The Exploit Database - CXSecurity.com
L
LINUX DO - 最新话题
Attack and Defense Labs
Attack and Defense Labs
S
Security @ Cisco Blogs
T
Troy Hunt's Blog
P
Palo Alto Networks Blog
T
Threat Research - Cisco Blogs
Simon Willison's Weblog
Simon Willison's Weblog
L
Lohrmann on Cybersecurity
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
J
Java Code Geeks
Hugging Face - Blog
Hugging Face - Blog
The Hacker News
The Hacker News
Jina AI
Jina AI
S
Secure Thoughts
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
月光博客
月光博客
S
Schneier on Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 【当耐特】
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
Know Your Adversary
Know Your Adversary
PCI Perspectives
PCI Perspectives
罗磊的独立博客
A
Arctic Wolf
雷峰网
雷峰网
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Latest news
Latest news

LWN.net comments

It's like capital gains taxes [LWN.net] This isn't just anti-ai, it's also anti-gui [LWN.net] Dead links [LWN.net] Can this marketing offensive please end? [LWN.net] Editing session recording as a throttling mechanism [LWN.net] Editing session recording as a throttling mechanism [LWN.net] Revealing [LWN.net] Data structures and overhead [LWN.net] Editing session recording as a throttling mechanism [LWN.net] Nonsense [LWN.net] Revealing [LWN.net] Nonsense [LWN.net] Surprising [LWN.net] Editing session recording as a throttling mechanism [LWN.net] Revealing [LWN.net] Recording? [LWN.net] tier support exist already in a fashion [LWN.net] Recording? [LWN.net] Nonsense [LWN.net] Nonsense [LWN.net] Nonsense [LWN.net] Nonsense [LWN.net] Nonsense [LWN.net] Nonsense [LWN.net] This isn't just anti-ai, it's also anti-gui [LWN.net] Nonsense [LWN.net] Revealing [LWN.net] This is bananas. [LWN.net] Nonsense [LWN.net] Just 12 vulnerabilities? [LWN.net] Nonsense [LWN.net] This isn't just anti-ai, it's also anti-gui [LWN.net] Surprising What if you just use AI to explore? Surprising [LWN.net] Nonsense [LWN.net] Nonsense [LWN.net] Revealing [LWN.net] Power trip? [LWN.net] Categorically no. [LWN.net] Editing session recording as a throttling mechanism [LWN.net] Nonsense [LWN.net] Nonsense [LWN.net] Surprising [LWN.net] Surprising [LWN.net] This is bananas. [LWN.net] Nonsense [LWN.net] This isn't just anti-ai, it's also anti-gui [LWN.net] Revealing [LWN.net] Nonsense [LWN.net] Just 12 vulnerabilities? [LWN.net] Nonsense [LWN.net] Editing session recording as a throttling mechanism [LWN.net] Privacy [LWN.net] Surprising [LWN.net] Speedruns do require this [LWN.net] Nonsense [LWN.net] Loss of words Nonsense [LWN.net] This isn't just anti-ai, it's also anti-gui [LWN.net] This seems unwieldy [LWN.net] Proprietary vs open source models [LWN.net] This seems unwieldy [LWN.net] Revealing [LWN.net] Surprising [LWN.net] Just 12 vulnerabilities? [LWN.net] Just 12 vulnerabilities? [LWN.net] Revealing [LWN.net] Revealing [LWN.net] Just 12 vulnerabilities? [LWN.net] Revealing [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Revealing [LWN.net] Generate assembly language directly with -S [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Deriving Documentation and Specifications [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Good, bad and probabilistic [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Proprietary vs open source models [LWN.net] Surprising [LWN.net] "Tokens per second" may not be the measure you think it is. [LWN.net] Surprising [LWN.net] Surprising [LWN.net] Surprising [LWN.net] Fundriser there [LWN.net] With hindsight, it was a code smell anyway [LWN.net] Shift in public's attitude [LWN.net] Thought I was the only one [LWN.net]
malloc(0) [LWN.net]
alx.manpages · 2026-05-28 · via LWN.net comments

> The null pointer satisfies all of the technical requirements of a heap-allocated zero-length array

This is not correct. You're allowed to do pointer arithmetic on malloc(0) if and only if it returns a non-null pointer. p+0 is valid for any non-NULL p, but NULL+0 has undefined behavior. This limitation of NULL pointers was lifted recently (ISO C2y), but historically it was UB; also, that change might have unexpected consequences, such as lower quality of static analysis, so I suggest not relying too much on it.

P.S.: Sorry for resurrecting this. I was researching the guarantees on argv[0] and read this incorrect statement by chance.