Make more fixes and improvements

- Remove PAGESIZE constant
- Fix realloc() documentation
- Fix ttyname_r() error reporting
- Make forking more reliable on Windows
- Make execvp() a few microseconds faster
- Make system() a few microseconds faster
- Tighten up the socket-related magic numbers
- Loosen restrictions on mmap() offset alignment
- Improve GetProgramExecutableName() with getenv("_")
- Use mkstemp() as basis for mktemp(), tmpfile(), tmpfd()
- Fix flakes in pthread_cancel_test, unix_test, fork_test
- Fix recently introduced futex stack overflow regression
- Let sockets be passed as stdio to subprocesses on Windows
- Improve security of bind() on Windows w/ SO_EXCLUSIVEADDRUSE
This commit is contained in:
Justine Tunney 2023-07-29 18:44:15 -07:00
parent 140a8a52e5
commit 18bb5888e1
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
311 changed files with 1239 additions and 2622 deletions

View file

@ -1140,7 +1140,8 @@ build_target_list (char *value)
void
init_hash_files (void)
{
hash_init (&files, 1000, file_hash_1, file_hash_2, file_hash_cmp);
// [jart] increased from 1000
hash_init (&files, 32768, file_hash_1, file_hash_2, file_hash_cmp);
}
/* EOF */

View file

@ -1,5 +1,4 @@
/* clang-format off */
/* clang-format off */
/* Locating a program in PATH.
Copyright (C) 2001-2003, 2009-2020 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.

View file

@ -2375,7 +2375,7 @@ exec_command (char **argv, char **envp)
/* Run the program. */
environ = envp;
execv (argv[0], argv);
execvp (argv[0], argv);
if(errno == ENOENT)
OSS (error, NILF, "%s: command doesn't exist: %s",

View file

@ -1036,6 +1036,10 @@ main (int argc, char **argv, char **envp)
#undef FATAL_SIG
#ifndef NDEBUG
ShowCrashReports();
#endif
/* Do not ignore the child-death signal. This must be done before
any children could possibly be created; otherwise, the wait
functions won't work on systems with the SVR4 ECHILD brain

View file

@ -253,7 +253,8 @@ strcache_add_len (const char *str, size_t len)
void
strcache_init (void)
{
hash_init (&strings, 8000, str_hash_1, str_hash_2, str_hash_cmp);
// [jart] increased from 8000
hash_init (&strings, 131072, str_hash_1, str_hash_2, str_hash_cmp);
}