mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Make ZipOS and Qemu work better
This change improves the dirstream library in a lot of respects, especially for /zip/... files. Also turn off MAP_STACK on Aarch64 because Qemu seems to implement it differently than Linux and it's probably responsible for a lot of mysterious crashes.
This commit is contained in:
parent
4658ae539f
commit
110559ce6a
48 changed files with 748 additions and 500 deletions
|
@ -29,10 +29,10 @@
|
|||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/mem/alloca.h"
|
||||
#include "libc/runtime/zipos.internal.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/at.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
#include "libc/runtime/zipos.internal.h"
|
||||
|
||||
static inline const char *__strace_fstatat_flags(char buf[12], int flags) {
|
||||
if (flags == AT_SYMLINK_NOFOLLOW) return "AT_SYMLINK_NOFOLLOW";
|
||||
|
@ -56,7 +56,9 @@ int fstatat(int dirfd, const char *path, struct stat *st, int flags) {
|
|||
/* execve() depends on this */
|
||||
int rc;
|
||||
struct ZiposUri zipname;
|
||||
if (__isfdkind(dirfd, kFdZip)) {
|
||||
if (IsAsan() && !__asan_is_valid(st, sizeof(*st))) {
|
||||
rc = efault();
|
||||
} else if (__isfdkind(dirfd, kFdZip)) {
|
||||
STRACE("zipos dirfd not supported yet");
|
||||
rc = einval();
|
||||
} else if (_weaken(__zipos_stat) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue