social.mikutter.hachune.netMastodonを使った分散型ソーシャルネットワークの一部です。
#あなたがガチ凍結されると<br> 11月中旬くらいかな?俺はておくれだから<br> Twitterからよく舐められるんだけど、<br> ある時Twitterが度が過ぎて俺を凍結<br> してきたわけ、そんで記憶がないんだけど(痴呆)、<br> 相当ボコボコにしちゃったらしい<br> 俺、これでもておくれですよ?

サーバーの情報

102
人のアクティブユーザー

もっと詳しく

#define

00人投稿今日0

/home/runner/work/netbsd-src/netbsd-src/src/tools/hp300-mkboot/../../sys/arch/hp300/stand/mkboot/mkboot.c: In function 'main':
/home/runner/work/netbsd-src/netbsd-src/src/tools/compat/../../sys/sys/bootblock.h:994:34: error: 'LIF_NUMDIR' undeclared (first use in this function); did you mean 'HPPA_LIF_NUMDIR'?
994 | HP300_LIF_DIRSIZE (LIF_NUMDIR * sizeof(struct hp300_lifdir))
| ^~~~~~~~~~

またミスっている

uaa@framboise:~/z/open-watcom-v2/bld/wasm$ cc -I ../watcom/h mkopcod1.c
ld: warning: mkopcod1.c(/tmp/mkopcod1-75d04f.o:(main)): warning: strcpy() is almost always misused, please use strlcpy()
uaa@framboise:~/z/open-watcom-v2/bld/wasm$ ./a.out a.txt
uaa@framboise:~/z/open-watcom-v2/bld/wasm$ cat a.txt
typedef enum asm_token {
T_NULL,
T_OP_TIMES,
T_OP_DIVIDE,
} asm_token;

MAX_KEYWORD_LEN 0
uaa@framboise:~/z/open-watcom-v2/bld/wasm$

ここが腐ってるのは何故だろう

<machine/vmparam.h> で
atariは
MAXSSIZ (256*1024*1024) /* max stack size */
virt68k は
DFLSSIZ (512*1024) /* initial stack size limit */
x68k は
MAXDSIZ (64*1024*1024) /* max data size */

という問題なのか

main things i needed to patch:
- GHOST_ContextVK.cc: ensure_vulkan_device() -> comment out the unsupported device_features: geometryShader (not needed anymore), dualSrcBlend, multiDrawIndirect, multiViewport, shaderClipDistance, drawIndirectFirstInstance. also skip the "continue" for missing geometryShader and dualSrcBlend.
- vk_backend.cc: not sure if needed, but removed all adding to the missing_capabilities vec.
- vk_device.cc: init_glsl_patch(): add a "#define gpu_BaseInstance(0)"

how to count page faults from userspace on x86 (no clocks were harmed in the making of this):

$ cat faultdetect.c
#define _GNU_SOURCE
#include <err.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>

#define SYSCHK(x) ({ \
typeof(x) __res = (x); \
if (__res == (typeof(x))-1) \
err(1, "SYSCHK(" #x ")"); \
__res; \
})

int main(int argc, char **argv) {
if (argc != 3) errx(1, "bad invocation");
int prefault = atoi(argv[1]);
int use_file = atoi(argv[2]);
printf("will first read from and then write to a %s page, %s first triggering a separate read fault\n",
use_file?"file":"anonymous", prefault?"after":"without");

int fd = -1;
if (use_file) {
fd = SYSCHK(open("/var/tmp", O_TMPFILE|O_RDWR, 0600));
SYSCHK(ftruncate(fd, 0x2000));
}
char *test_area = SYSCHK(mmap(NULL, 0x2000, PROT_READ|PROT_WRITE, MAP_SHARED|(use_file?0:MAP_ANONYMOUS), fd, 0));
if (prefault)
*(volatile char *)test_area;

unsigned long *boundary = (void*)(test_area + 0x1000);
for (int i=0; i<29; i++)
boundary[i] = i;
asm volatile(
"mov %%rsp, %%r15\n"
"mov %%rbp, %%r14\n"
"mov %[rspval], %%rsp\n"
"mov %[rbpval], %%rbp\n"
"enter $0, $31\n"
"mov %%r14, %%rbp\n"
"mov %%r15, %%rsp\n"
:: [rspval] "r"(boundary+31), [rbpval] "r"(boundary+29)
:"cc","memory","r15","r14"
);
unsigned long number_of_faults = 28 - boundary[29];
printf("instruction fault-restarted %lu times\n", number_of_faults);
}
$ gcc -o faultdetect faultdetect.c
$ ./faultdetect 0 0
will first read from and then write to a anonymous page, without first triggering a separate read fault
instruction fault-restarted 1 times
$ ./faultdetect 1 0
will first read from and then write to a anonymous page, after first triggering a separate read fault
instruction fault-restarted 0 times
$ ./faultdetect 0 1
will first read from and then write to a file page, without first triggering a separate read fault
instruction fault-restarted 2 times
$ ./faultdetect 1 1
will first read from and then write to a file page, after first triggering a separate read fault
instruction fault-restarted 1 times
$

The worst thing about C flexible array members is that even though the standard says “you can malloc one with sizeof(T) + sizeof(Elem)*N”, this over-estimates the size, so you shouldn’t assume that a pointer to one has that much memory available. Example:

godbolt.org/z/M18acYEcK

The right way to calculate fucking sucks: it’s offsetof(T, flex_field[N]) rounded up to alignof(T), which ends up looking like this:

#define ALIGN_MASK(T) (_Alignof(T) - 1)
#define FAM_SIZE(T, FAM, COUNT) \
((offsetof(T, FAM[COUNT]) + ALIGN_MASK(T)) & ~ALIGN_MASK(T))

godbolt.orgCompiler Explorer - C (x86-64 clang (trunk)) struct foo { int bar; short baz; char frob[]; }; struct foo f = { .frob = {1, 2}, }; int main() { memset(&f, 0, sizeof(f) + sizeof(f.frob[0]) * 1); }

とりあえず:
xenocara/app/xterm/xtermcfg.hで#define OPT_STATUS_LINE 1でビルドはできる
termcapは適当に設定しないといけない(けどどう設定する?)
hs/es両対応かどうかは不明