# US 2018/0321875 A1 · ECC Memory Controller To Detect Dangling Pointers

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0321875 A1
- Document ID: US20180321875A1
- Status: Published application
- Kind: A1
- Application number: 15/589,217
- Filed: 2017-05-08
- Published: 2018-11-08
- Earliest claimed: 2017-05-08
- Assignees: Silicon Laboratories Inc.
- Applicants: Silicon Laboratories Inc.
- Inventors: Thomas S. David
- Web page: https://patentgrep.com/patent/US20180321875A1

## CPC

- G06F 11/1076: {Parity data used in redundant arrays of independent storages, e.g. in RAID systems}
- G06F 11/08: Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F 11/1012: {using codes or arrangements adapted for a specific type of error (G06F11/1048 takes precedence)}
- G06F 11/2215: {to test error correction or detection circuits}
- G06F 12/1425: {the protection being physical, e.g. cell, word, block}
- H03M 13/13: Linear codes
- G06F 2212/1056: Simplification
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

A system and method of utilizing ECC memory to detect software errors and malicious activities is disclosed. In one embodiment, after a pool of memory is freed, every data word in that pool is modified to ensure that an ECC error will occur if any data word in that pool is read again. In another embodiment, the ECC memory controller is used to detect and prevent non-secure applications from accessing secure portions of memory.

## Claims

### Claim 1

A system for detecting dangling pointers, comprising:
an ECC memory controller adapted to be in communication with a data memory and an ECC memory; wherein the ECC memory controller comprises a state machine, wherein the state machine writes an erroneous data word to the data memory at a data address and an erroneous ECC syndrome to the ECC memory at the data address.

### Claim 2 (depends on 1)

The system of claim 1, wherein the state machine comprises a starting address register to store a starting address and a second register to indicate a number of data addresses to be written.

### Claim 3 (depends on 2)

The system of claim 2, wherein the state machine repeats steps of:
incrementing the data address after writing the erroneous data word and the erroneous ECC syndrome; and
writing the erroneous data word to the data memory and the erroneous ECC syndrome to the ECC memory at the data address;
until the number of data addresses has been written.

### Claim 4 (depends on 2)

The system of claim 2, wherein the second register comprises a word count register.

### Claim 5 (depends on 2)

The system of claim 2, wherein the second register comprises an ending address register.

### Claim 6 (depends on 1)

The system of claim 1, wherein the erroneous data word and the erroneous ECC syndrome are written to denote that memory at the data address has been freed.

### Claim 7 (depends on 6)

The system of claim 6, wherein an ECC error is indicated if a freed memory location is read.

### Claim 8

A method of detecting dangling pointers, comprising:
writing erroneous data word to a data memory and an erroneous ECC syndrome to an ECC memory at a memory address, where the erroneous data word and erroneous ECC syndrome are selected to as to generate an ECC error; and
reading the erroneous data word and the erroneous ECC syndrome at the memory address at a later time; and
generating an ECC error after the reading.

### Claim 9 (depends on 8)

The method of claim 8, wherein a state machine is disposed in an ECC memory controller, the ECC memory controller adapted to be in communication with a data memory and an ECC memory, the method further comprising, prior to the writing:
loading a starting address into a starting address register in the state machine;
providing an indication of a word count to the state machine; and
using the starting address as a memory address.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
incrementing the memory address after the writing;
incrementing a counter after the writing; and
repeating the writing and incrementing steps if the counter is less than the word count.

### Claim 11 (depends on 9)

The method of claim 9, wherein providing an indication of the word count comprising writing the word count to a word count register in the state machine.

### Claim 12 (depends on 9)

The method of claim 9, wherein providing an indication of the word count comprising writing a second address to an ending address register in the state machine.

### Claim 13

A system for detecting dangling pointers, comprising:
an ECC memory controller adapted to be in communication with a data memory and an ECC memory; wherein the ECC memory controller comprises a state machine, wherein the state machine reads a syndrome stored in the ECC memory at an ECC address, corrupts the syndrome by inverting at least one bit, and writes the corrupted syndrome back to the ECC memory at the ECC address.

### Claim 14 (depends on 13)

The system of claim 13, wherein the state machine comprises a starting address register to store the starting address and a second register to indicate a number of syndromes that are to be corrupted, and wherein the ECC address is initialized to the starting address.

### Claim 15 (depends on 14)

The system of claim 14, wherein the state machine repeats steps of:
incrementing the ECC address after writing the corrupted syndrome;
reading a syndrome stored in the ECC memory at the ECC address;
corrupting the syndrome by inverting at least one bit; and
writing the corrupted syndrome back to the ECC memory at the ECC address;
until the number of syndromes has been corrupted.

### Claim 16 (depends on 14)

The system of claim 14, wherein the second register comprises a word count register.

### Claim 17 (depends on 14)

The system of claim 14, wherein the second register comprises an ending address register.

### Claim 18

A system for detecting dangling pointers, comprising:
an ECC memory controller adapted to be in communication with a data memory and an ECC memory; wherein the ECC memory controller comprises a state machine, wherein the state machine reads a data word stored in the data memory at a data address, corrupts the data word by inverting at least one bit, and writes the corrupted data word back to the data memory at the data address.

### Claim 19 (depends on 18)

The system of claim 18, wherein the state machine comprises a starting address register to store the starting address and a second register to indicate a number of words that are to be corrupted, and wherein the data address is initialized to the starting address.

### Claim 20 (depends on 19)

The system of claim 19, wherein the state machine repeats steps of:
incrementing the data address after writing the corrupted data word;
reading a data word stored in the data memory at the data address;
corrupting the data word by inverting at least one bit; and
writing the corrupted data word back to the data memory at the data address;
until the number of data words has been corrupted.

### Claim 21 (depends on 19)

The system of claim 19, wherein the second register comprises a word count register.

### Claim 22 (depends on 19)

The system of claim 19, wherein the second register comprises an ending address register.
