NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/54325: src/sys/arch/atari/atari/machdep.c: 289: use of dangling pointer ?



>Number:         54325
>Category:       kern
>Synopsis:       src/sys/arch/atari/atari/machdep.c: 289: use of dangling pointer ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 24 14:15:00 +0000 2019
>Originator:     David Binderman
>Release:        cvs 20190624
>Organization:
>Environment:
>Description:
src/sys/arch/atari/atari/machdep.c:273] -> [src/sys/arch/atari/atari/machdep.c:267] -> [src/sys/arch/atari/atari/machdep.c:289]: (error) Using pointer to local variable 'cputxt' that is out of scope.

      const char *mach, *mmu, *fpu, *cpu;

...
               {
                        uint32_t        pcr;
                        char            cputxt[30];

                        __asm(".word 0x4e7a,0x0808;"
                            "movl %%d0,%0" : "=d"(pcr) : : "d0");
                        snprintf(cputxt, sizeof(cputxt), "68%s060 rev.%d",
                            pcr & 0x10000 ? "LC/EC" : "", (pcr >> 8) & 0xff);
                        cpu = cputxt;

...

   cpu_setmodel("%s (%s CPU%s%sFPU)", mach, cpu, mmu, fpu);

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index