public void SetTasfnorm(List<Transform> l)
twgame
git checkout: cargo run --bin bug-8199 ~/.local/share/ddnet/teehistorian/
Dump of assembler code for function program::program::try_into_bytes(f1):
0x00007ffff7fbf000 <+0>: push r14
0x00007ffff7fbf002 <+2>: push rbx ; here rbx has an addressable address
0x00007ffff7fbf003 <+3>: sub rsp,0x98
0x00007ffff7fbf00a <+10>: mov r10d,DWORD PTR [rsp+0xb0]
0x00007ffff7fbf012 <+18>: mov r11d,DWORD PTR [rsp+0xb8]
0x00007ffff7fbf01a <+26>: mov eax,r9d
0x00007ffff7fbf01d <+29>: mov rbx,rdi
0x00007ffff7fbf020 <+32>: mov r9,r8
0x00007ffff7fbf023 <+35>: sub rsp,0x8
0x00007ffff7fbf027 <+39>: movabs r14,0x7ffff7fbf290
0x00007ffff7fbf031 <+49>: lea rdi,[rsp+0x48]
0x00007ffff7fbf036 <+54>: xor r8d,r8d
0x00007ffff7fbf039 <+57>: push 0x0
0x00007ffff7fbf03b <+59>: push 0x0
0x00007ffff7fbf03d <+61>: push 0x0
0x00007ffff7fbf03f <+63>: push 0x0
0x00007ffff7fbf041 <+65>: push r11
0x00007ffff7fbf043 <+67>: push r10
0x00007ffff7fbf045 <+69>: push rax
0x00007ffff7fbf046 <+70>: call r14 ; after this call, rbx has a invalid addr - program::program::try_into_bytes[expr29](f0)
0x00007ffff7fbf049 <+73>: add rsp,0x40
0x00007ffff7fbf04d <+77>: vmovups xmm0,XMMWORD PTR [rsp+0x60]
0x00007ffff7fbf053 <+83>: mov rsi,QWORD PTR [rsp+0x58]
0x00007ffff7fbf058 <+88>: mov rax,QWORD PTR [rsp+0x40]
0x00007ffff7fbf05d <+93>: mov rcx,QWORD PTR [rsp+0x48]
0x00007ffff7fbf062 <+98>: mov rdx,QWORD PTR [rsp+0x50]
0x00007ffff7fbf067 <+103>: mov rdi,QWORD PTR [rsp+0x70]
0x00007ffff7fbf06c <+108>: mov QWORD PTR [rsp+0x20],rsi
0x00007ffff7fbf071 <+113>: mov QWORD PTR [rsp+0x38],rdi
0x00007ffff7fbf076 <+118>: vmovups XMMWORD PTR [rsp+0x28],xmm0
0x00007ffff7fbf07c <+124>: test sil,0x1
0x00007ffff7fbf080 <+128>: jne 0x7ffff7fbf0b5 <program::program::try_into_bytes(f1)+181>
0x00007ffff7fbf082 <+130>: vmovups xmm0,XMMWORD PTR [rsp+0x80]
0x00007ffff7fbf08b <+139>: mov BYTE PTR [rsp+0x78],0x0
0x00007ffff7fbf090 <+144>: mov edi,DWORD PTR [rsp+0x90]
0x00007ffff7fbf097 <+151>: mov rsi,QWORD PTR [rsp+0x78]
=> 0x00007ffff7fbf09c <+156>: mov QWORD PTR [rbx+0x10],rdx
0x00007ffff7fbf0a0 <+160>: mov QWORD PTR [rbx+0x8],rcx
0x00007ffff7fbf0a4 <+164>: mov DWORD PTR [rbx+0x30],edi
Dump of assembler code for function program::program::try_into_bytes(f1):
0x00007ffff7fbf000 <+0>: push r14
0x00007ffff7fbf002 <+2>: push rbx ; here rbx has an addressable address
0x00007ffff7fbf003 <+3>: sub rsp,0x98
0x00007ffff7fbf00a <+10>: mov r10d,DWORD PTR [rsp+0xb0]
0x00007ffff7fbf012 <+18>: mov r11d,DWORD PTR [rsp+0xb8]
0x00007ffff7fbf01a <+26>: mov eax,r9d
0x00007ffff7fbf01d <+29>: mov rbx,rdi
0x00007ffff7fbf020 <+32>: mov r9,r8
0x00007ffff7fbf023 <+35>: sub rsp,0x8
0x00007ffff7fbf027 <+39>: movabs r14,0x7ffff7fbf290
0x00007ffff7fbf031 <+49>: lea rdi,[rsp+0x48]
0x00007ffff7fbf036 <+54>: xor r8d,r8d
0x00007ffff7fbf039 <+57>: push 0x0
0x00007ffff7fbf03b <+59>: push 0x0
0x00007ffff7fbf03d <+61>: push 0x0
0x00007ffff7fbf03f <+63>: push 0x0
0x00007ffff7fbf041 <+65>: push r11
0x00007ffff7fbf043 <+67>: push r10
0x00007ffff7fbf045 <+69>: push rax
0x00007ffff7fbf046 <+70>: call r14 ; after this call, rbx has a invalid addr - program::program::try_into_bytes[expr29](f0)
0x00007ffff7fbf049 <+73>: add rsp,0x40
0x00007ffff7fbf04d <+77>: vmovups xmm0,XMMWORD PTR [rsp+0x60]
0x00007ffff7fbf053 <+83>: mov rsi,QWORD PTR [rsp+0x58]
0x00007ffff7fbf058 <+88>: mov rax,QWORD PTR [rsp+0x40]
0x00007ffff7fbf05d <+93>: mov rcx,QWORD PTR [rsp+0x48]
0x00007ffff7fbf062 <+98>: mov rdx,QWORD PTR [rsp+0x50]
0x00007ffff7fbf067 <+103>: mov rdi,QWORD PTR [rsp+0x70]
0x00007ffff7fbf06c <+108>: mov QWORD PTR [rsp+0x20],rsi
0x00007ffff7fbf071 <+113>: mov QWORD PTR [rsp+0x38],rdi
0x00007ffff7fbf076 <+118>: vmovups XMMWORD PTR [rsp+0x28],xmm0
0x00007ffff7fbf07c <+124>: test sil,0x1
0x00007ffff7fbf080 <+128>: jne 0x7ffff7fbf0b5 <program::program::try_into_bytes(f1)+181>
0x00007ffff7fbf082 <+130>: vmovups xmm0,XMMWORD PTR [rsp+0x80]
0x00007ffff7fbf08b <+139>: mov BYTE PTR [rsp+0x78],0x0
0x00007ffff7fbf090 <+144>: mov edi,DWORD PTR [rsp+0x90]
0x00007ffff7fbf097 <+151>: mov rsi,QWORD PTR [rsp+0x78]
=> 0x00007ffff7fbf09c <+156>: mov QWORD PTR [rbx+0x10],rdx
0x00007ffff7fbf0a0 <+160>: mov QWORD PTR [rbx+0x8],rcx
0x00007ffff7fbf0a4 <+164>: mov DWORD PTR [rbx+0x30],edi
$rax : 0x1
$rbx : 0x7fff00000000
$rcx : 0x9875ec
$rdx : 0x0
$rsp : 0x00007fffffff8840 → 0x0000555565d304a8 → 0x8000000000000008
$rbp : 0x00007fffffff89e8 → 0x00007fffffff9260 → 0x0000000000000000
$rsi : 0x00007fffffff9100 → 0x0000555565d28920 → 0x0000000000000008
$rdi : 0xffff89e8
$rip : 0x00007ffff7fc209c → 0x084b894810538948
$r8 : 0x0
$r9 : 0x00007fffffff87b8 → 0x0000555565d27e00 → 0x0000555565d68408 → 0x0000555565d458f0 → 0x0000555030bf20e5
$r10 : 0x00007fffffff87b8 → 0x0000555565d27e00 → 0x0000555565d68408 → 0x0000555565d458f0 → 0x0000555030bf20e5
$r11 : 0x0
$r12 : 0x0
$r13 : 0x0000555565d87e80 → 0x0000555030829037
$r14 : 0x00007ffff7fc2290 → 0x4853544156415741 ("AWAVATSH"?)
$r15 : 0x9875ec
$eflags: [ZERO carry PARITY adjust sign trap INTERRUPT direction overflow RESUME virtualx86 identification]
$cs: 0x33 $ss: 0x2b $ds: 0x00 $es: 0x00 $fs: 0x00 $gs: 0x00
$rax : 0x1
$rbx : 0x7fff00000000
$rcx : 0x9875ec
$rdx : 0x0
$rsp : 0x00007fffffff8840 → 0x0000555565d304a8 → 0x8000000000000008
$rbp : 0x00007fffffff89e8 → 0x00007fffffff9260 → 0x0000000000000000
$rsi : 0x00007fffffff9100 → 0x0000555565d28920 → 0x0000000000000008
$rdi : 0xffff89e8
$rip : 0x00007ffff7fc209c → 0x084b894810538948
$r8 : 0x0
$r9 : 0x00007fffffff87b8 → 0x0000555565d27e00 → 0x0000555565d68408 → 0x0000555565d458f0 → 0x0000555030bf20e5
$r10 : 0x00007fffffff87b8 → 0x0000555565d27e00 → 0x0000555565d68408 → 0x0000555565d458f0 → 0x0000555030bf20e5
$r11 : 0x0
$r12 : 0x0
$r13 : 0x0000555565d87e80 → 0x0000555030829037
$r14 : 0x00007ffff7fc2290 → 0x4853544156415741 ("AWAVATSH"?)
$r15 : 0x9875ec
$eflags: [ZERO carry PARITY adjust sign trap INTERRUPT direction overflow RESUME virtualx86 identification]
$cs: 0x33 $ss: 0x2b $ds: 0x00 $es: 0x00 $fs: 0x00 $gs: 0x00
$rbx : 0x00007fffffff88f8 → 0x00007fffffff9110 → 0x0000555565d34510 → 0x0000000000000008
program::program::try_into_bytes[expr25](f0):
Dump of assembler code for function program::program::try_into_bytes[expr25](f0):
=> 0x00007ffff7fc22a0 <+0>: push r15
0x00007ffff7fc22a2 <+2>: push r14
0x00007ffff7fc22a4 <+4>: push r12
0x00007ffff7fc22a6 <+6>: push rbx
0x00007ffff7fc22a7 <+7>: sub rsp,0x68
0x00007ffff7fc22ab <+11>: int3
0x00007ffff7fc22ac <+12>: mov r14,rdi
0x00007ffff7fc22af <+15>: mov rdi,QWORD PTR [rsp+0xa8]
0x00007ffff7fc22b7 <+23>: mov r12,rsi
0x00007ffff7fc22ba <+26>: inc r12
0x00007ffff7fc22bd <+29>: mov r15,rcx
0x00007ffff7fc22c0 <+32>: mov rbx,rdx
0x00007ffff7fc22c3 <+35>: xor eax,eax
0x00007ffff7fc22c5 <+37>: test al,al
0x00007ffff7fc22c7 <+39>: jne 0x7ffff7fc233d <program::program::try_into_bytes[expr25](f0)+157>
0x00007ffff7fc22c9 <+41>: mov esi,DWORD PTR [rsp+0x98]
0x00007ffff7fc22d0 <+48>: mov eax,DWORD PTR [rsp+0xc0]
0x00007ffff7fc22d7 <+55>: mov ecx,DWORD PTR [rsp+0xb8]
0x00007ffff7fc22de <+62>: mov edx,DWORD PTR [rsp+0xb0]
0x00007ffff7fc22e5 <+69>: lea r10,[rsp+0x48]
0x00007ffff7fc22ea <+74>: lea r9,[rsp+0x28]
0x00007ffff7fc22ef <+79>: sub esi,DWORD PTR [rsp+0x90]
0x00007ffff7fc22f6 <+86>: cmp r8d,esi
0x00007ffff7fc22f9 <+89>: cmove r9,r10
0x00007ffff7fc22fd <+93>: mov DWORD PTR [r9+0x14],ecx
0x00007ffff7fc2301 <+97>: mov DWORD PTR [r9+0x10],edx
0x00007ffff7fc2305 <+101>: mov QWORD PTR [r9+0x8],rdi
0x00007ffff7fc2309 <+105>: mov DWORD PTR [r9+0x18],eax
0x00007ffff7fc230d <+109>: mov DWORD PTR [r9+0x20],r8d
0x00007ffff7fc2311 <+113>: mov BYTE PTR [r9],0x0
0x00007ffff7fc2315 <+117>: vmovups xmm0,XMMWORD PTR [r9+0x8]
0x00007ffff7fc231b <+123>: mov rax,QWORD PTR [r9]
0x00007ffff7fc231e <+126>: mov rcx,QWORD PTR [r9+0x18]
0x00007ffff7fc2322 <+130>: mov QWORD PTR [r14+0x10],r15
0x00007ffff7fc2326 <+134>: mov QWORD PTR [r14+0x8],rbx
0x00007ffff7fc232a <+138>: mov QWORD PTR [r14+0x30],rcx
0x00007ffff7fc232e <+142>: vmovups XMMWORD PTR [r14+0x20],xmm0
0x00007ffff7fc2334 <+148>: mov QWORD PTR [r14+0x18],rax
0x00007ffff7fc2338 <+152>: mov QWORD PTR [r14],r12
0x00007ffff7fc233b <+155>: jmp 0x7ffff7fc23b8 <program::program::try_into_bytes[expr25](f0)+280>
0x00007ffff7fc233d <+157>: movabs rax,0x7ffff7a0b0c0
0x00007ffff7fc2347 <+167>: call rax
0x00007ffff7fc2349 <+169>: movabs rax,0x7ffff7a0b320
0x00007ffff7fc2353 <+179>: mov esi,0x100
0x00007ffff7fc2358 <+184>: xor edi,edi
0x00007ffff7fc235a <+186>: call rax
0x00007ffff7fc235c <+188>: movabs rcx,0x7ffff7fc1020
0x00007ffff7fc2366 <+198>: vmovaps ymm0,YMMWORD PTR [rcx]
0x00007ffff7fc236a <+202>: movabs rcx,0x100000000
0x00007ffff7fc2374 <+212>: vmovups YMMWORD PTR [rax],ymm0
0x00007ffff7fc2378 <+216>: mov QWORD PTR [rsp+0x18],rcx
0x00007ffff7fc237d <+221>: mov QWORD PTR [rsp+0x10],rax
0x00007ffff7fc2382 <+226>: mov BYTE PTR [rsp+0x8],0x1
0x00007ffff7fc2387 <+231>: mov DWORD PTR [rsp+0x20],0x8
0x00007ffff7fc238f <+239>: vmovups xmm0,XMMWORD PTR [rsp+0x10]
0x00007ffff7fc2395 <+245>: mov rax,QWORD PTR [rsp+0x8]
0x00007ffff7fc239a <+250>: mov rcx,QWORD PTR [rsp+0x20]
0x00007ffff7fc239f <+255>: mov QWORD PTR [r14],r12
0x00007ffff7fc23a2 <+258>: mov QWORD PTR [r14+0x10],r15
0x00007ffff7fc23a6 <+262>: mov QWORD PTR [r14+0x30],rcx
0x00007ffff7fc23aa <+266>: vmovups XMMWORD PTR [r14+0x20],xmm0
0x00007ffff7fc23b0 <+272>: mov QWORD PTR [r14+0x18],rax
0x00007ffff7fc23b4 <+276>: mov QWORD PTR [r14+0x8],rbx
0x00007ffff7fc23b8 <+280>: mov rax,r14
0x00007ffff7fc23bb <+283>: add rsp,0x68
0x00007ffff7fc23bf <+287>: pop rbx
0x00007ffff7fc23c0 <+288>: pop r12
0x00007ffff7fc23c2 <+290>: pop r14
0x00007ffff7fc23c4 <+292>: pop r15
0x00007ffff7fc23c6 <+294>: vzeroupper
0x00007ffff7fc23c9 <+297>: ret
0x00007ffff7fc233b <+155>: jmp 0x7ffff7fc23b8 <program::program::try_into_bytes[expr25](f0)+280>
0x00007ffff7fc2378 <+216>: mov QWORD PTR [rsp+0x18],rcx
0x00007ffff7fc237d <+221>: mov QWORD PTR [rsp+0x10],rax
0x00007ffff7fc2382 <+226>: mov BYTE PTR [rsp+0x8],0x1
0x00007ffff7fc2387 <+231>: mov DWORD PTR [rsp+0x20],0x8
Dump of assembler code for function program::program::try_into_bytes[expr25](f0):
0x00007ffff7fc22a0 <+0>: push r15
0x00007ffff7fc22a2 <+2>: push r14
0x00007ffff7fc22a4 <+4>: push r12
0x00007ffff7fc22a6 <+6>: push rbx
0x00007ffff7fc22a7 <+7>: sub rsp,0x68
0x00007ffff7fc22ab <+11>: int3
=> 0x00007ffff7fc22ac <+12>: mov r14,rdi
x/10w ($rsp+0x68)
(edited)0x7fffffff8a68: 0xffff8b98 0x7fff 0x0 0x0
0x7fffffff8a78: 0xf7fc22a0 0x7fff 0x9875ec 0x0
0x7fffffff8a88: 0xf7fc204a 0x7fff
0x7fffffff8a68: 0x7fffffff8b98 0x0
0x7fffffff8a78: 0x7ffff7fc22a0 0x9875ec
0x7fffffff8a88: 0x7ffff7fc204a 0x0
0x7fffffff8a98: 0x0 0x0
0x7fffffff8aa8: 0x0 0x0
$rbx : 0x00007fffffff8b98 → 0x00007fffffff9370 → 0x0000555565d05cd0 → 0x0000000000000008
gef➤ x/10g ($rsp)
0x7fffffff8a68: 0x7fff00000000 0x0
0x7fffffff8a78: 0x7ffff7fc22a0 0x9875ec
0x7fffffff8a88: 0x7ffff7fc204a 0x0
0x7fffffff8a98: 0x0 0x0
0x7fffffff8aa8: 0x0 0x0
watch *(size_t *)($rsp+0x68)
or something like that 0x00007ffff7fc22e5 <+69>: lea r10,[rsp+0x48] ; this stack addr is loaded into r9
0x00007ffff7fc22ea <+74>: lea r9,[rsp+0x28] ; or this stack addr is loaded into r9
0x00007ffff7fc22ef <+79>: sub esi,DWORD PTR [rsp+0x90]
0x00007ffff7fc22f6 <+86>: cmp r8d,esi ; which depends on this
0x00007ffff7fc22f9 <+89>: cmove r9,r10 ; at this cmov
Finding your bug is a process of confirming the many things you believe are true, until you find one which is not true.
(old_time / new_time) * 100
?2024-04-07
and 2024-04-13
. I think for the remaining affected teehistorian files it is best to check with the database whether finishes exist on those and only then check the demo.pub async fn create(pool: &MySqlPool, user: User) -> Result<Option<i32>, sqlx::Error> {
let result = sqlx::query("INSERT IGNORE INTO users (username, password) VALUES (?, ?)")
.bind(&user.username)
.bind(&user.password)
.execute(pool)
.await?;
if result.rows_affected() == 1 {
Ok(Some(result.last_insert_id() as i32))
} else {
Ok(None)
}
}
i fckn love this syntax so much, its so much funpub async fn create(pool: &MySqlPool, user: User) -> Result<Option<i32>, sqlx::Error> {
let result = sqlx::query("INSERT IGNORE INTO users (username, password) VALUES (?, ?)")
.bind(&user.username)
.bind(&user.password)
.execute(pool)
.await?;
if result.rows_affected() == 1 {
Ok(Some(result.last_insert_id() as i32))
} else {
Ok(None)
}
}
i fckn love this syntax so much, its so much fun