PK���ȼRY��������€��� �v3.phpUT �øŽg‰gñ“gux �õ��õ��½T]kÛ0}߯pEhìâÙM7X‰çv%”v0֐µ{)Aå:6S$!ÉMJèߕ?R÷!>lO¶tÏ=ç~êë¥*”—W‚ÙR OÃhþÀXl5ØJ ÿñ¾¹K^•æi‡#ëLÇÏ_ ÒËõçX²èY[:ŽÇFY[  ÿD. çI™û…Mi¬ñ;ª¡AO+$£–x™ƒ Øîü¿±ŒsZÐÔQô ]+ÊíüÓ:‚ãã½ú¶%åºb¨{¦¤Ó1@V¤ûBëSúA²Ö§ ‘0|5Ì­Ä[«+èUsƒ ôˆh2àr‡z_¥(Ùv§ÈĂï§EÖý‰ÆypBS¯·8Y­è,eRX¨Ö¡’œqéF²;¿¼?Ø?Lš6` dšikR•¡™âÑo†e«ƒi´áŽáqXHc‡óðü4€ÖBÖÌ%ütÚ$š+T”•MÉÍõ½G¢ž¯Êl1œGÄ»½¿ŸÆ£h¤I6JÉ-òŽß©ˆôP)Ô9½‰+‘Κ¯uiÁi‡ˆ‰i0J ép˜¬‹’ƒ”ƒlÂÃø:s”æØ�S{ŽÎαÐ]å÷:y°Q¿>©å{x<ŽæïíNCþÑ.Mf?¨«2ý}=ûõýî'=£§ÿu•Ü(—¾IIa­"éþ@¶�¿ä9?^-qìÇÞôvŠeÈc ðlacã®xèÄ'®âd¶ çˆSEæódP/ÍÆv{Ô)Ó ?>…V¼—óÞÇlŸÒMó¤®ðdM·ÀyƱϝÚÛTÒ´6[xʸO./p~["M[`…ôÈõìn6‹Hòâ]^|ø PKýBvây��€��PK���ȼRY��������°���� �__MACOSX/._v3.phpUT �øŽg‰gþ“gux �õ��õ��c`cg`b`ðMLVðVˆP€'qƒøˆŽ!!AP&HÇ %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (���d�o�m�p�d�f� �2�.�0�.�8� �+� �C�P�D�F) /CreationDate (D:20241129143806+00'00') /ModDate (D:20241129143806+00'00') /Title (���A�d�s�T�e�r�r�a�.�c�o�m� �i�n�v�o�i�c�e) >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 595.280 841.890] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 904 >> stream x���]o�J���+F�ͩ����su\ �08=ʩzရ���lS��lc� "Ց� ���wޙ�%�R�DS��� �OI�a`� �Q�f��5����_���םO�`�7�_FA���D�Џ.j�a=�j����>��n���R+�P��l�rH�{0��w��0��=W�2D ����G���I�>�_B3ed�H�yJ�G>/��ywy�fk��%�$�2.��d_�h����&)b0��"[\B��*_.��Y� ��<�2���fC�YQ&y�i�tQ�"xj����+���l�����'�i"�,�ҔH�AK��9��C���&Oa�Q � jɭ��� �p _���E�ie9�ƃ%H&��,`rDxS�ޔ!�(�X!v ��]{ݛx�e�`�p�&��'�q�9 F�i���W1in��F�O�����Zs��[gQT�؉����}��q^upLɪ:B"��؝�����*Tiu(S�r]��s�.��s9n�N!K!L�M�?�*[��N�8��c��ۯ�b�� ��� �YZ���SR3�n�����lPN��P�;��^�]�!'�z-���ӊ���/��껣��4�l(M�E�QL��X ��~���G��M|�����*��~�;/=N4�-|y�`�i�\�e�T�<���L��G}�"В�J^���q��"X�?(V�ߣXۆ{��H[����P�� �c���kc�Z�9v�����? �a��R�h|��^�k�D4W���?Iӊ�]<��4�)$wdat���~�����������|�L��x�p|N�*��E� �/4�Qpi�x.>��d����,M�y|4^�Ż��8S/޾���uQe���D�y� ��ͧH�����j�wX � �&z� endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 10 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000284 00000 n 0000000313 00000 n 0000000514 00000 n 0000000617 00000 n 0000001593 00000 n 0000001700 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1812 %%EOF
Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 131
// errorcheck -0 -m -l // Copyright 2022 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. // Test escape analysis for reflect Value operations. package escape import ( "reflect" "unsafe" ) var sink interface{} func typ(x int) any { v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Type() } func kind(x int) reflect.Kind { v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Kind() } func int1(x int) int { v := reflect.ValueOf(x) // ERROR "x does not escape" return int(v.Int()) } func ptr(x *int) *int { // ERROR "leaking param: x to result ~r0 level=0" v := reflect.ValueOf(x) return (*int)(v.UnsafePointer()) } func bytes1(x []byte) byte { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Bytes()[0] } // Unfortunate: should only escape content. x (the interface storage) should not escape. func bytes2(x []byte) []byte { // ERROR "leaking param: x$" v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Bytes() } func string1(x string) string { // ERROR "leaking param: x to result ~r0 level=0" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.String() } func string2(x int) string { v := reflect.ValueOf(x) // ERROR "x does not escape" return v.String() } // Unfortunate: should only escape to result. func interface1(x any) any { // ERROR "leaking param: x$" v := reflect.ValueOf(x) return v.Interface() } func interface2(x int) any { v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Interface() } // Unfortunate: should not escape. func interface3(x int) int { v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Interface().(int) } // Unfortunate: should only escape to result. func interface4(x *int) any { // ERROR "leaking param: x$" v := reflect.ValueOf(x) return v.Interface() } func addr(x *int) reflect.Value { // ERROR "leaking param: x to result ~r0 level=0" v := reflect.ValueOf(x).Elem() return v.Addr() } // functions returning pointer as uintptr have to escape. func uintptr1(x *int) uintptr { // ERROR "leaking param: x$" v := reflect.ValueOf(x) return v.Pointer() } func unsafeaddr(x *int) uintptr { // ERROR "leaking param: x$" v := reflect.ValueOf(x).Elem() return v.UnsafeAddr() } func ifacedata(x any) [2]uintptr { // ERROR "moved to heap: x" v := reflect.ValueOf(&x).Elem() return v.InterfaceData() } func can(x int) bool { v := reflect.ValueOf(x) // ERROR "x does not escape" return v.CanAddr() || v.CanInt() || v.CanSet() || v.CanInterface() } func is(x int) bool { v := reflect.ValueOf(x) // ERROR "x does not escape" return v.IsValid() || v.IsNil() || v.IsZero() } func is2(x [2]int) bool { v := reflect.ValueOf(x) // ERROR "x does not escape" return v.IsValid() || v.IsNil() || v.IsZero() } func is3(x struct{ a, b int }) bool { v := reflect.ValueOf(x) // ERROR "x does not escape" return v.IsValid() || v.IsNil() || v.IsZero() } func overflow(x int) bool { v := reflect.ValueOf(x) // ERROR "x does not escape" return v.OverflowInt(1 << 62) } func len1(x []int) int { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Len() } func len2(x [3]int) int { v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Len() } func len3(x string) int { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Len() } func len4(x map[int]int) int { // ERROR "x does not escape" v := reflect.ValueOf(x) return v.Len() } func len5(x chan int) int { // ERROR "x does not escape" v := reflect.ValueOf(x) return v.Len() } func cap1(x []int) int { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Cap() } func cap2(x [3]int) int { v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Cap() } func cap3(x chan int) int { // ERROR "x does not escape" v := reflect.ValueOf(x) return v.Cap() } func setlen(x *[]int, n int) { // ERROR "x does not escape" v := reflect.ValueOf(x).Elem() v.SetLen(n) } func setcap(x *[]int, n int) { // ERROR "x does not escape" v := reflect.ValueOf(x).Elem() v.SetCap(n) } // Unfortunate: x doesn't need to escape to heap, just to result. func slice1(x []byte) []byte { // ERROR "leaking param: x$" v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Slice(1, 2).Bytes() } // Unfortunate: x doesn't need to escape to heap, just to result. func slice2(x string) string { // ERROR "leaking param: x$" v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Slice(1, 2).String() } func slice3(x [10]byte) []byte { v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Slice(1, 2).Bytes() } func elem1(x *int) int { // ERROR "x does not escape" v := reflect.ValueOf(x) return int(v.Elem().Int()) } func elem2(x *string) string { // ERROR "leaking param: x to result ~r0 level=1" v := reflect.ValueOf(x) return string(v.Elem().String()) } type S struct { A int B *int C string } func (S) M() {} func field1(x S) int { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return int(v.Field(0).Int()) } func field2(x S) string { // ERROR "leaking param: x to result ~r0 level=0" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Field(2).String() } func numfield(x S) int { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.NumField() } func index1(x []int) int { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return int(v.Index(0).Int()) } // Unfortunate: should only leak content (level=1) func index2(x []string) string { // ERROR "leaking param: x to result ~r0 level=0" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Index(0).String() } func index3(x [3]int) int { v := reflect.ValueOf(x) // ERROR "x does not escape" return int(v.Index(0).Int()) } func index4(x [3]string) string { // ERROR "leaking param: x to result ~r0 level=0" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Index(0).String() } func index5(x string) byte { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return byte(v.Index(0).Uint()) } // Unfortunate: x (the interface storage) doesn't need to escape as the function takes a scalar arg. func call1(f func(int), x int) { // ERROR "leaking param: f$" fv := reflect.ValueOf(f) v := reflect.ValueOf(x) // ERROR "x escapes to heap" fv.Call([]reflect.Value{v}) // ERROR "\[\]reflect\.Value{\.\.\.} does not escape" } func call2(f func(*int), x *int) { // ERROR "leaking param: f$" "leaking param: x$" fv := reflect.ValueOf(f) v := reflect.ValueOf(x) fv.Call([]reflect.Value{v}) // ERROR "\[\]reflect.Value{\.\.\.} does not escape" } func method(x S) reflect.Value { // ERROR "leaking param: x$" v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Method(0) } func nummethod(x S) int { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.NumMethod() } // Unfortunate: k doesn't need to escape. func mapindex(m map[string]string, k string) string { // ERROR "m does not escape" "leaking param: k$" mv := reflect.ValueOf(m) kv := reflect.ValueOf(k) // ERROR "k escapes to heap" return mv.MapIndex(kv).String() } func mapkeys(m map[string]string) []reflect.Value { // ERROR "m does not escape" mv := reflect.ValueOf(m) return mv.MapKeys() } func mapiter1(m map[string]string) *reflect.MapIter { // ERROR "leaking param: m$" mv := reflect.ValueOf(m) return mv.MapRange() } func mapiter2(m map[string]string) string { // ERROR "leaking param: m$" mv := reflect.ValueOf(m) it := mv.MapRange() if it.Next() { return it.Key().String() } return "" } func mapiter3(m map[string]string, it *reflect.MapIter) { // ERROR "leaking param: m$" "it does not escape" mv := reflect.ValueOf(m) it.Reset(mv) } func recv1(ch chan string) string { // ERROR "ch does not escape" v := reflect.ValueOf(ch) r, _ := v.Recv() return r.String() } func recv2(ch chan string) string { // ERROR "ch does not escape" v := reflect.ValueOf(ch) r, _ := v.TryRecv() return r.String() } // Unfortunate: x (the interface storage) doesn't need to escape. func send1(ch chan string, x string) { // ERROR "ch does not escape" "leaking param: x$" vc := reflect.ValueOf(ch) vx := reflect.ValueOf(x) // ERROR "x escapes to heap" vc.Send(vx) } // Unfortunate: x (the interface storage) doesn't need to escape. func send2(ch chan string, x string) bool { // ERROR "ch does not escape" "leaking param: x$" vc := reflect.ValueOf(ch) vx := reflect.ValueOf(x) // ERROR "x escapes to heap" return vc.TrySend(vx) } func close1(ch chan string) { // ERROR "ch does not escape" v := reflect.ValueOf(ch) v.Close() } func select1(ch chan string) string { // ERROR "leaking param: ch$" v := reflect.ValueOf(ch) cas := reflect.SelectCase{Dir: reflect.SelectRecv, Chan: v} _, r, _ := reflect.Select([]reflect.SelectCase{cas}) // ERROR "\[\]reflect.SelectCase{...} does not escape" return r.String() } // Unfortunate: x (the interface storage) doesn't need to escape. func select2(ch chan string, x string) { // ERROR "leaking param: ch$" "leaking param: x$" vc := reflect.ValueOf(ch) vx := reflect.ValueOf(x) // ERROR "x escapes to heap" cas := reflect.SelectCase{Dir: reflect.SelectSend, Chan: vc, Send: vx} reflect.Select([]reflect.SelectCase{cas}) // ERROR "\[\]reflect.SelectCase{...} does not escape" } var ( intTyp = reflect.TypeOf(int(0)) // ERROR "0 does not escape" uintTyp = reflect.TypeOf(uint(0)) // ERROR "uint\(0\) does not escape" stringTyp = reflect.TypeOf(string("")) // ERROR ".. does not escape" bytesTyp = reflect.TypeOf([]byte{}) // ERROR "\[\]byte{} does not escape" ) // Unfortunate: should not escape. func convert1(x int) uint { v := reflect.ValueOf(x) // ERROR "x escapes to heap" return uint(v.Convert(uintTyp).Uint()) } // Unfortunate: should only escape content to result. func convert2(x []byte) string { // ERROR "leaking param: x$" v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Convert(stringTyp).String() } // Unfortunate: v doesn't need to leak, x (the interface storage) doesn't need to escape. func set1(v reflect.Value, x int) { // ERROR "leaking param: v$" vx := reflect.ValueOf(x) // ERROR "x escapes to heap" v.Set(vx) } // Unfortunate: a can be stack allocated, x (the interface storage) doesn't need to escape. func set2(x int) int64 { var a int // ERROR "moved to heap: a" v := reflect.ValueOf(&a).Elem() vx := reflect.ValueOf(x) // ERROR "x escapes to heap" v.Set(vx) return v.Int() } func set3(v reflect.Value, x int) { // ERROR "v does not escape" v.SetInt(int64(x)) } func set4(x int) int { var a int v := reflect.ValueOf(&a).Elem() // a should not escape, no error printed v.SetInt(int64(x)) return int(v.Int()) } func set5(v reflect.Value, x string) { // ERROR "v does not escape" "leaking param: x$" v.SetString(x) } func set6(v reflect.Value, x []byte) { // ERROR "v does not escape" "leaking param: x$" v.SetBytes(x) } func set7(v reflect.Value, x unsafe.Pointer) { // ERROR "v does not escape" "leaking param: x$" v.SetPointer(x) } func setmapindex(m map[string]string, k, e string) { // ERROR "m does not escape" "leaking param: k$" "leaking param: e$" mv := reflect.ValueOf(m) kv := reflect.ValueOf(k) // ERROR "k escapes to heap" ev := reflect.ValueOf(e) // ERROR "e escapes to heap" mv.SetMapIndex(kv, ev) } // Unfortunate: k doesn't need to escape. func mapdelete(m map[string]string, k string) { // ERROR "m does not escape" "leaking param: k$" mv := reflect.ValueOf(m) kv := reflect.ValueOf(k) // ERROR "k escapes to heap" mv.SetMapIndex(kv, reflect.Value{}) } // Unfortunate: v doesn't need to leak. func setiterkey1(v reflect.Value, it *reflect.MapIter) { // ERROR "leaking param: v$" "it does not escape" v.SetIterKey(it) } // Unfortunate: v doesn't need to leak. func setiterkey2(v reflect.Value, m map[string]string) { // ERROR "leaking param: v$" "leaking param: m$" it := reflect.ValueOf(m).MapRange() v.SetIterKey(it) } // Unfortunate: v doesn't need to leak. func setitervalue1(v reflect.Value, it *reflect.MapIter) { // ERROR "leaking param: v$" "it does not escape" v.SetIterValue(it) } // Unfortunate: v doesn't need to leak. func setitervalue2(v reflect.Value, m map[string]string) { // ERROR "leaking param: v$" "leaking param: m$" it := reflect.ValueOf(m).MapRange() v.SetIterValue(it) } // Unfortunate: s doesn't need escape, only leak to result. // And x (interface storage) doesn't need to escape. func append1(s []int, x int) []int { // ERROR "leaking param: s$" sv := reflect.ValueOf(s) // ERROR "s escapes to heap" xv := reflect.ValueOf(x) // ERROR "x escapes to heap" rv := reflect.Append(sv, xv) // ERROR "... argument does not escape" return rv.Interface().([]int) } // Unfortunate: s doesn't need escape, only leak to result. func append2(s, x []int) []int { // ERROR "leaking param: s$" "x does not escape" sv := reflect.ValueOf(s) // ERROR "s escapes to heap" xv := reflect.ValueOf(x) // ERROR "x does not escape" rv := reflect.AppendSlice(sv, xv) return rv.Interface().([]int) }