- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for safety (0.17 sec)
-
src/archive/zip/reader.go
// Since the number of directory records is not validated, it is not // safe to preallocate r.File without first checking that the specified // number of files is reasonable, since a malformed archive may // indicate it contains up to 1 << 128 - 1 files. Since each file has a // header which will be _at least_ 30 bytes we can safely preallocate // if (data size / 30) >= end.directoryRecords.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 27.7K bytes - Viewed (0) -
src/bufio/scan.go
s.end -= s.start s.start = 0 } // Finally we can read some input. Make sure we don't get stuck with // a misbehaving Reader. Officially we don't need to do this, but let's // be extra careful: Scanner is for safe, simple jobs. for loop := 0; ; { n, err := s.r.Read(s.buf[s.end:len(s.buf)]) if n < 0 || len(s.buf)-s.end < n { s.setErr(ErrBadReadCount) break } s.end += n if err != nil {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Oct 23 09:06:30 GMT 2023 - 14.2K bytes - Viewed (0) -
doc/asm.html
When using the compiler and assembler's <code>-dynlink</code> or <code>-shared</code> modes, any load or store of a fixed memory location such as a global variable must be assumed to overwrite <code>CX</code>. Therefore, to be safe for use with these modes, assembly sources should typically avoid CX except between memory references. </p> <h3 id="amd64">64-bit Intel 386 (a.k.a. amd64)</h3> <p>
HTML - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Nov 28 19:15:27 GMT 2023 - 36.3K bytes - Viewed (0) -
src/arena/arena.go
// license that can be found in the LICENSE file. //go:build goexperiment.arenas /* The arena package provides the ability to allocate memory for a collection of Go values and free that space manually all at once, safely. The purpose of this functionality is to improve efficiency: manually freeing memory before a garbage collection delays that cycle. Less frequent cycles means the CPU cost of the garbage collector is incurred less frequently.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Oct 12 20:23:36 GMT 2022 - 4.3K bytes - Viewed (0) -
doc/go1.17_spec.html
provides facilities for low-level programming including operations that violate the type system. A package using <code>unsafe</code> must be vetted manually for type safety and may not be portable. The package provides the following interface: </p> <pre class="grammar"> package unsafe type ArbitraryType int // shorthand for an arbitrary Go type; it is not a real type
HTML - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 211.6K bytes - Viewed (0) -
src/cmd/cgo/ast.go
} for _, spec := range d.Specs { if s, ok := spec.(*ast.ImportSpec); ok && s.Path.Value == `"C"` { // Replace "C" with _ "unsafe", to keep program valid. // (Deleting import statement or clause is not safe if it is followed // in the source by an explicit semicolon.) f.Edit.Replace(f.offset(s.Path.Pos()), f.offset(s.Path.End()), `_ "unsafe"`) } } } }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jun 07 16:54:27 GMT 2023 - 14.3K bytes - Viewed (0) -
src/cmd/cgo/doc.go
and of course there is nothing stopping the C code from doing anything it likes. However, programs that break these rules are likely to fail in unexpected and unpredictable ways. The runtime/cgo.Handle type can be used to safely pass Go values between Go and C. See the runtime/cgo package documentation for details. Note: the current implementation has a bug. While Go code is permitted
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Sun Mar 31 09:02:45 GMT 2024 - 42.1K bytes - Viewed (0) -
src/cmd/asm/internal/asm/operand_test.go
{"(R1, R3)", "(R1, R3)"}, {"[R0,R1,g,R15", ""}, // Issue 11764 - asm hung parsing ']' missing register lists. {"[):[o-FP", ""}, // Issue 12469 - there was no infinite loop for ARM; these are just sanity checks. {"[):[R0-FP", ""}, {"(", ""}, // Issue 12466 - backed up before beginning of line. } var ppc64OperandTests = []operandTest{ {"$((1<<63)-1)", "$9223372036854775807"}, {"$(-64*1024)", "$-65536"},
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 18:31:05 GMT 2023 - 23.9K bytes - Viewed (0) -
src/archive/zip/register.go
"compress/flate" "errors" "io" "sync" ) // A Compressor returns a new compressing writer, writing to w. // The WriteCloser's Close method must be used to flush pending data to w. // The Compressor itself must be safe to invoke from multiple goroutines // simultaneously, but each returned writer will be used only by // one goroutine at a time. type Compressor func(w io.Writer) (io.WriteCloser, error)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 3.7K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
typedef[sub.Go.(*ast.Ident).Name].C = t.C } // If we've seen this typedef before, and it // was an anonymous struct/union/class before // too, use the old definition. // TODO: it would be safer to only do this if // we verify that the types are the same. if oldType != nil && isStructUnionClass(oldType.Go) { t.Go = oldType.Go } } case *dwarf.UcharType: if t.Size != 1 {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Nov 02 16:43:23 GMT 2023 - 97K bytes - Viewed (0)