5 ms·
Importantly, you will need to recompile with /LARGEADDRESSAWARE.
by trimbo 15y ago
Importantly, you will need to recompile with /LARGEADDRESSAWARE.
- 4ad 15y agoYeah, that kernel flag is useless without stamping the binaries, and the Go linker doesn't know about this.
- barrkel 15y agoIt's just a flag in the PE headers. It can be modified after the fact with a tool; the Go linker doesn't need to know.
- doug363 15y agoBut the reason why there is an explicit flag in the first place is that there's a lot of code out there that doesn't work with pointers >= 0x80000000, or when pointers could differ by more than that. Things like pointer "tagging", and signed integer overflow bugs, are examples of the sort of code that can be affected. Without knowing details about the Go code generation and runtime/garbage collection, it would be a bit risky to just set the flag and hope for the best.
- barrkel 15y agoOh, I know; I've written bounds-checking logic for RTLs that use casts to integers and tests for negativity to check for overrun, implicitly assuming 31-bit address space. My only point is that a limitation of the Go linker does not preclude setting the flag.
- 4ad 15y agoNo such problems in Go. I just checked and the flag is set by default in all Windows binaries.
- 4ad 15y ago> the Go linker doesn't know about this. I was wrong, it does, it's on by default :).