Uros Bizjak <ubiz...@gmail.com> writes:

> There is no need for a panic in test/nilptr.go if array doesn't get
> allocated in first 256 meg of memory. The compiler has nothing to do
> with this.

This is true but this does not seem like the right patch.


> Index: test/nilptr.go
> ===================================================================
> --- test/nilptr.go      (revision 183732)
> +++ test/nilptr.go      (working copy)
> @@ -22,7 +22,8 @@
>         // at the address that might be accidentally
>         // dereferenced below.
>         if uintptr(unsafe.Pointer(&dummy)) > 256<<20 {
> -               panic("dummy too far out")
> +               println("dummy too far out")
> +               return
>         }
>
>         shouldPanic(p1)


This patch makes this test pretty much useless: if the linker changes,
the test will always pass, and nobody will ever notice that the test is
no longer being run.

I think I would prefer to just change go-test.exp to mark this test as
xfail on Alpha.  A patch to do that is preapproved.

Ian

Reply via email to