Mostrando entradas con la etiqueta bug. Mostrar todas las entradas
Mostrando entradas con la etiqueta bug. Mostrar todas las entradas

jueves, 21 de abril de 2011

Escribir codigo que, simplemente funcione

No hay mucho para explicar o agregar: 
 
> can you try following change ? it will push gart to 0x80000000
>
> diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
> index 86d1ad4..3b6a9d5 100644
> --- a/arch/x86/kernel/aperture_64.c
> +++ b/arch/x86/kernel/aperture_64.c
> @@ -83,7 +83,7 @@ static u32 __init allocate_aperture(void)
>         * so don't use 512M below as gart iommu, leave the space for kernel
>         * code for safe
>         */
> -       addr = memblock_find_in_range(0, 1ULL<<32, aper_size, 512ULL<<20);
> +       addr = memblock_find_in_range(0, 1ULL<<32, aper_size, 512ULL<<21);

What are all the magic numbers, and why would 0x80000000 be special?

Why don't we write code that just works?

Or absent a "just works" set of patches, why don't we revert to code
that has years of testing?

This kind of "I broke things, so now I will jiggle things randomly
until they unbreak" is not acceptable.

Either explain why that fixes a real BUG (and why the magic constants
need to be what they are), or just revert the patch that caused the
problem, and go back to the allocation patters that have years of
experience.

Guys, we've had this discussion before, in PCI allocation. We don't do
this. We tried switching the PCI region allocations to top-down, and
IT WAS A FAILURE. We reverted it to what we had years of testing with.

Don't just make random changes. There really are only two acceptable
models of development: "think and analyze" or "years and years of
testing on thousands of machines". Those two really do work.

                   Linus

lunes, 17 de enero de 2011

Status: RESOLVED FIXED

Mi primer bug en mozilla! (si, es trivial pero, me pone contento igual!)

https://bugzilla.mozilla.org/show_bug.cgi?id=606824
http://hg.mozilla.org/mozilla-central/rev/a5092e4ae324

Solo puedo agregar lo siguiente:

=)

viernes, 20 de marzo de 2009

Black Hole: Un link que apunta a otro

Pensando el otro día se me ocurrió probar que pasaba si un acceso directo de windows (archivo .lnk) apuntaba a otro y a su vez, ese otro apuntaba al primero.
Es decir:

A.lnk --> Apunta a B.lnk
B.lnk --> Apunta a A.lnk

Formando asi una especie de ciclo sin fin.
Obviamente, esto no se puede hacer con el sistema operativo en si, es decir, tecnicamente hablando: "el windo' no te deja, che"
Pero, con la ayuda de un editor hexa se puede lograr. El efecto (y por el cual lo nombré blackhole) es que el explorer crashea. No podés ver que hay dentro de la carpeta que los contiene.
Esto fue testeado en windows2000 y windowsXP.
En windows98... NO FALLA!!!
Aparentemente en windows Vista está corregido. La prueba que hice no falló. Quedaría ver que sucede con accesos creados en Vista, pero me imagino que es lo mismo, no va a fallar.

Procedimiento:
Antes que nada, no lo pongan en el escritorio ya que crasheará el explorer y no lo podrán arreglar mas que entrando en modo consola.

1) Crear un archivo. Digamos: C:\Prueba\A.txt
2) Generar un acceso directo al mismo. Digamos C:\Prueba\A.lnk
3) Borrar A.txt
4) Editar A.lnk con un editor HEXA. Es sencillo, van a ver varios caracteres ilegibles y, en medio de todo eso, por varios lados aparece el nombre del archivo
"C:\Prueba\A.txt" eso lo cambiamos por C:\Prueba\B.lnk
5) Copiar el A.lnk editado y pegarlo. Renombrarlo a B.lnk.
6) Abrir B.lnk. Vamos a encontrarnos que dentro apunta a B.lnk (ya que es el A.lnk editado) Reemplazamos C:\Prueba\B.lnk por C:\Prueba\A.lnk
7) Nos quedó A.lnk apuntando a B.lnk y viceversa.
8) Al entrar en la carpeta prueba usando el explorador de windows, veran como crashea.

NO me hago responsable si se les cuelga windows o algo mas desagradable pasa. En todas las pruebas que realice solo moria el explorer (y levantaba de nuevo por si solo)

Happy Testing.