avrdude-dev
[Top][All Lists]
Advanced

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

Regression in r1436 ("Fix some out-of-bounds/uninitialized issues")


From: Sven Schwermer
Subject: Regression in r1436 ("Fix some out-of-bounds/uninitialized issues")
Date: Thu, 24 Jun 2021 13:23:53 +0200

Hi,

I have investigated the regression mentioned in 
https://lists.nongnu.org/archive/html/avrdude-dev/2020-09/msg00023.html a 
little closer. Here’s the diff of the output of

  avrdude -c jtag3updi -p t1614 -v -v 2>&1

on revisions 1435 (working) and 1436 (failing), respectively:

--- /home/pi/working    2021-06-24 12:09:47.575805309 +0100
+++ /home/pi/failing    2021-06-24 12:10:31.375434851 +0100
@@ -34,19 +34,19 @@
                                   Block Poll               Page                
       Polled
            Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  
MaxW   ReadBack
            ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- 
----- ---------
-           signature      0     0     0    0 no          3    0      0     0   
  0 0x00 0x00
+           signature      0     0     0    0 no          3    1      0     0   
  0 0x00 0x00
            prodsig        0     0     0    0 no         61   61      0     0   
  0 0x00 0x00
-           fuses          0     0     0    0 no          9    0      0     0   
  0 0x00 0x00
-           fuse0          0     0     0    0 no          1    0      0     0   
  0 0x00 0x00
-           fuse1          0     0     0    0 no          1    0      0     0   
  0 0x00 0x00
-           fuse2          0     0     0    0 no          1    0      0     0   
  0 0x00 0x00
-           fuse4          0     0     0    0 no          1    0      0     0   
  0 0x00 0x00
-           fuse5          0     0     0    0 no          1    0      0     0   
  0 0x00 0x00
-           fuse6          0     0     0    0 no          1    0      0     0   
  0 0x00 0x00
-           fuse7          0     0     0    0 no          1    0      0     0   
  0 0x00 0x00
-           fuse8          0     0     0    0 no          1    0      0     0   
  0 0x00 0x00
-           lock           0     0     0    0 no          1    0      0     0   
  0 0x00 0x00
-           data           0     0     0    0 no          0    0      0     0   
  0 0x00 0x00
+           fuses          0     0     0    0 no          9    1      0     0   
  0 0x00 0x00
+           fuse0          0     0     0    0 no          1    1      0     0   
  0 0x00 0x00
+           fuse1          0     0     0    0 no          1    1      0     0   
  0 0x00 0x00
+           fuse2          0     0     0    0 no          1    1      0     0   
  0 0x00 0x00
+           fuse4          0     0     0    0 no          1    1      0     0   
  0 0x00 0x00
+           fuse5          0     0     0    0 no          1    1      0     0   
  0 0x00 0x00
+           fuse6          0     0     0    0 no          1    1      0     0   
  0 0x00 0x00
+           fuse7          0     0     0    0 no          1    1      0     0   
  0 0x00 0x00
+           fuse8          0     0     0    0 no          1    1      0     0   
  0 0x00 0x00
+           lock           0     0     0    0 no          1    1      0     0   
  0 0x00 0x00
+           data           0     0     0    0 no          0    1      0     0   
  0 0x00 0x00
            usersig        0     0     0    0 no         32   32      0     0   
  0 0x00 0x00
            flash          0     0     0    0 no      16384   64      0     0   
  0 0x00 0x00
            eeprom         0     0     0    0 no        256   32      0     0   
  0 0x00 0x00
@@ -95,23 +95,38 @@
 avrdude: Partial Family_ID returned: "tiny"
 avrdude: AVR device initialized and ready to accept instructions

-Reading | avrdude: jtag3_read_byte(.., signature, 0x0, ...)
+Reading | avrdude: jtag3_paged_load(.., signature, 1, 0x0, 1)
           mapped to address: 0x1100
 avrdude: Sending enter progmode command: 0x80 (3 bytes msg)
-avrdude: Sending read memory command: 0x84 (7 bytes msg)
-avrdude: jtag3_read_byte(.., signature, 0x1, ...)
-          mapped to address: 0x1101
-################avrdude: jtag3_read_byte(.., signature, 0x2, ...)
-          mapped to address: 0x1102
-################################## | 100% 0.07s
-
-avrdude: Device signature = 0x1e9422 (probably t1614)
-
-avrdude: safemode: Fuses OK (E:FF, H:FF, L:FF)
-avrdude: Sending leave progmode command: 0x80 (3 bytes msg)
-avrdude: jtag3_close()
-avrdude: Sending AVR sign-off command: 0x80 (3 bytes msg)
-avrdude: Sending sign-off command: 0x80 (3 bytes msg)
-
-avrdude done.  Thank you.
-
+avrdude: Sending read memory command: 0x84 (4 bytes msg)
+avrdude: Sending read memory command: 0x84 (4 bytes msg)
+avrdude: Sending read memory command: 0x84 (4 bytes msg)

As you can see, the page size gets (incorrectly?) set to 1 where it was 0 
before. This causes the jtag3_read_byte to become jtag3_paged_load for the 
signature register. I don’t have a thorough understanding of the code here, but 
perhaps this diff makes it easier to fix…

This is the culprit: 
https://lists.nongnu.org/archive/html/avrdude-dev/2020-09/msg00002.html

Best regards,
Sven


reply via email to

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