avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] avrdude r1160 Segmentation fault


From: René Liebscher
Subject: Re: [avrdude-dev] avrdude r1160 Segmentation fault
Date: Mon, 06 May 2013 20:13:09 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

HI,

as C guarantees only 16 bit for an int but 32 bit for a long, you better take the long as fallback. (even if is unlikely that avrdude will ever be compiled for a machine with only 16 bit integer.)

René


On 06.05.2013 11:59, Joerg Wunsch wrote:
As Joerg Wunsch wrote:

As Joerg Wunsch wrote:

The entire pgm structure appears to be garbled after some point:
More datapoints: update.c obviously has a different idea about
struct programmer_t than anyone else:
The confusion arose out of pindefs.h testing for HAVE_STDINT_H, and
then either using uint32_t or unsigned long for pinmask_t, depending
on whether <stdint.h> is supposed to be available or not.

Testing for one of the HAVE_* macros requires to include "ac_cfg.h"
before.  Failure to do so resulted in a struct programmer_t with two
different definitions for the pinmask arrays.  No deal for 32-bit
systems, but both arrays differed in size for 64-bit systems.
(Shouldn't the fallback type be "unsigned int" anyway, rather than
"unsigned long"?)

Yes, there should be a single, combined libavrdude.h file. ;-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]