Commit e09f7f0
src: limit GetProcessTitle() result to 1MB
`GetProcessTitle()` otherwise runs an infinite loop when
`uv_setup_argv()` has not been called (yet). This is a problem
e.g. in assertions from static constructors, which run before
`main()` and thus before `argc` and `argv` become available.
To solve that, do not allocate more than 1MB of storage for the
title and bail out if we reach that point.
PR-URL: #35492
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent 5790c40 commit e09f7f0Copy full SHA for e09f7f0
File tree
Expand file treeCollapse file tree
1 file changed
+4
-1
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
1 file changed
+4
-1
lines changedOpen diff view settings
Collapse file
+4-1Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
144 | 144 | |
145 | 145 | |
146 | 146 | |
147 | | - |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
148 | 151 | |
149 | 152 | |
150 | 153 | |
|
0 commit comments