Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Siddhesh Poyarekar <siddhesh@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: bitpos expansion patches summary
Date: Sun, 19 Aug 2012 16:42:00 -0000	[thread overview]
Message-ID: <20120819164147.GA27469@host2.jankratochvil.net> (raw)
In-Reply-To: <20120805005350.150e5b74@spoyarek>

Hi Siddhesh,

another part of the review.


Thanks,
Jan


RSAFE: (dwarf2loc.c:2257):	FUNC(memcpy):	(ULONGEST to size_t)	[n]
SAFE(value_contents_raw ensures size_t): (dwarf2loc.c:2277):	CMP:	(ULONGEST to size_t)	[n > (type)->length]
SAFE(value_contents_raw ensures size_t): (dwarf2loc.c:2283):	ASSIGN:	(ULONGEST to size_t)	[ n = (type)->length]
RSAFE: (dwarf2read.c:7340):	FUNC(memcpy):	(ULONGEST to size_t)	[(type)->length]
FIXED(Expand bit_offset): (dwarf2read.c:9847):	VARINIT(bit_offset):	(ULONGEST to int)	[((attr)->u.unsnd)]
SAFE(Pointer Type): (dwarf2read.c:11298):	CMP:	(int to ULONGEST)	[(type)->length != byte_size]
SAFE(Pointer Type): (dwarf2read.c:11310):	CMP:	(int to ULONGEST)	[(type)->length != byte_size]
SAFE: (dwarf2read.c:11376):	ASSIGN:	(UCHAR to ULONGEST)	[ (type)->length = cu_header->addr_size]
SAFE: (dwarf2read.c:11888):	CMP:	(int to ULONGEST)	[(int_type)->length >= addr_size]
SAFE: (dwarf2read.c:11893):	CMP:	(int to ULONGEST)	[(int_type)->length >= addr_size]
SAFE: (dwarf2read.c:11898):	CMP:	(int to ULONGEST)	[(int_type)->length >= addr_size]
SAFE: (dwarf2read.c:15218):	CMP:	(UCHAR to ULONGEST)	[(type)->length != cu_header->addr_size]
SAFE: (dwarf2read.c:15220):	FUNC(dwarf2_const_value_length_mismatch_complaint):	(UCHAR to LONGEST)	[cu_header->addr_size]
SAFE: (dwarf2read.c:15254):	CMP:	(size_t to ULONGEST)	[(type)->length != blk->size]
SAFE: (elfread.c:628):	VARINIT(ptr_size):	(ULONGEST to size_t)	[(ptr_type)->length]
SAFE: (elfread.c:869):	VARINIT(ptr_size):	(ULONGEST to size_t)	[(ptr_type)->length]
RSAFE: (eval.c:446):	FUNC(memcpy):	(ULONGEST to size_t)	[(value_type(val))->length]
RSAFE: (eval.c:489):	FUNC(memcpy):	(LONGEST to size_t)	[element_size]
RSAFE: (eval.c:498):	FUNC(memcpy):	(LONGEST to size_t)	[element_size]
SAFE: (eval.c:611):	CMP:	(int to ULONGEST)	[(type1)->length * 8 > gdbarch_double_bit(gdbarch)]
SAFE: (eval.c:612):	CMP:	(int to ULONGEST)	[(type2)->length * 8 > gdbarch_double_bit(gdbarch)]
SAFE: (eval.c:715):	CMP:	(int to ULONGEST)	[result_len > gdbarch_long_bit(gdbarch) / 8]
SAFE: (eval.c:722):	CMP:	(int to ULONGEST)	[result_len > gdbarch_long_bit(gdbarch) / 8]
RSAFE: (eval.c:996):	FUNC(memset):	(ULONGEST to size_t)	[(type)->length]
RSAFE: (eval.c:1015):	FUNC(memset):	(ULONGEST to size_t)	[(expect_type)->length]
RSAFE: (eval.c:1046):	FUNC(memcpy):	(LONGEST to size_t)	[element_size]
RSAFE: (eval.c:1069):	FUNC(memset):	(ULONGEST to size_t)	[(type)->length]
SEPARATE(Ensure that the value fits into CORE_ADDR): (eval.c:2075):	FUNC(value_from_pointer):	(LONGEST to CORE_ADDR)	[value_as_long(arg1) + mem_offset]
 - I do not understand this, you have correctly made 'long->LONGEST mem_offset;', I find it enough.
SAFE: (findcmd.c:184):	CMP:	(size_t to LONGEST)	[(val_bytes) > (sizeof(int64_t))]
 - (new entry) I miss here findcmd.c:190 fix, xrealloc 
   ULONGEST pattern_buf_size;
   pattern_buf = xrealloc (pattern_buf, pattern_buf_size);
   That second xrealloc parameter may overflow, there should be ENSURED_SIZET.
ENSURED_SIZET: (findcmd.c:218):	FUNC(memcpy):	(LONGEST to size_t)	[val_bytes]
 - Not needed, there is already called 'value_contents (v)'.
RSAFE: (findvar.c:493):	FUNC(memcpy):	(LONGEST to size_t)	[len]
RSAFE: (frame.c:872):	FUNC(memcpy):	(ULONGEST to size_t)	[(value_type(value))->length]
RSAFE: (frame.c:874):	FUNC(memset):	(ULONGEST to size_t)	[(value_type(value))->length]
UNRELATED(Expand return value): (f-valprint.c:85):	RET:	(LONGEST to int)	[((((((type))->main_type->flds_bnds.fields[0]).type))->main_type->flds_bnds.bounds->high)]
 - I agree unrelated but when found it should be fixed in a separate patch.
FIXED(Expand i): (f-valprint.c:178):	CMP:	(LONGEST to int)	[i < (f77_array_offset_tbl[nss][1])]
FIXED(Expand i): (f-valprint.c:189):	CMP:	(LONGEST to int)	[i < (f77_array_offset_tbl[nss][1])]
FIXED(Expand i): (f-valprint.c:194):	CMP:	(LONGEST to int)	[i < (f77_array_offset_tbl[nss][1])]
FIXED(Expand i): (f-valprint.c:203):	CMP:	(LONGEST to int)	[i != ((f77_array_offset_tbl[nss][1]) - 1)]
FIXED(Expand i): (f-valprint.c:207):	CMP:	(LONGEST to int)	[i != ((f77_array_offset_tbl[nss][1]) - 1)]
SAFE: (gdbtypes.c:841):	CMP:	(size_t to ULONGEST)	[(type)->length > sizeof(LONGEST)]
SAFE: (gdbtypes.c:3718):	ASSIGN:	(LONGEST to int)	[ left = (((f[0]).loc.bitpos) + 0) % alignment]
FIXED(Expand embedded_offset): (go-valprint.c:107):	FUNC(print_go_string):	(LONGEST to int)	[embedded_offset]
 - But print_go_string does not have embedded_offset expanded - failure of splint re-run.
UNSAFE_ALLOCA: (h8300-tdep.c:675):	FUNC(C_alloca):	(LONGEST to size_t)	[padded_len]
 - There should be alloca fix again with xmalloc and cleanup.
ENSURED_SIZET: (h8300-tdep.c:677):	FUNC(memset):	(LONGEST to size_t)	[padded_len]
 - This is redundant, there is already above it:
   char *contents = (char *) value_contents (args[argument]);
ENSURED_SIZET: (h8300-tdep.c:679):	FUNC(memcpy):	(LONGEST to size_t)	[len]
ENSURED_SIZET: (h8300-tdep.c:689):	FUNC(write_memory):	(LONGEST to ssize_t)	[padded_len]
ENSURED_SIZET: (h8300-tdep.c:716):	FUNC(write_memory):	(LONGEST to ssize_t)	[padded_len]
FIXED(Expand len): (h8300-tdep.c:747):	VARINIT(len):	(ULONGEST to int)	[(type)->length]
FIXED(Likewise): (h8300-tdep.c:784):	VARINIT(len):	(ULONGEST to int)	[(type)->length]
FIXED(Likewise): (h8300-tdep.c:851):	VARINIT(len):	(ULONGEST to int)	[(type)->length]
FIXED(Likewise): (h8300-tdep.c:881):	VARINIT(len):	(ULONGEST to int)	[(type)->length]
ENSURED_SIZET: (h8300-tdep.c:928):	FUNC(read_memory):	(ULONGEST to ssize_t)	[(type)->length]
 - Redundant, caller must have provided large enough READBUF.


  parent reply	other threads:[~2012-08-19 16:42 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-04 19:24 Siddhesh Poyarekar
2012-08-07 14:39 ` Jan Kratochvil
2012-08-07 15:10   ` Siddhesh Poyarekar
2012-08-07 15:48   ` Siddhesh Poyarekar
2012-08-08 22:43 ` Jan Kratochvil
2012-08-08 22:50   ` Jan Kratochvil
2012-08-09  2:04   ` Siddhesh Poyarekar
2012-08-10  1:28   ` Siddhesh Poyarekar
2012-08-17  9:35     ` Siddhesh Poyarekar
2012-08-09 20:04 ` Jan Kratochvil
2012-08-10  1:44   ` Siddhesh Poyarekar
2012-08-10  7:51     ` Jan Kratochvil
2012-08-10  7:58       ` Siddhesh Poyarekar
2012-08-12 17:57 ` Jan Kratochvil
2012-08-13  2:52   ` Siddhesh Poyarekar
2012-08-13 13:49     ` Jan Kratochvil
2012-08-13 14:04       ` Siddhesh Poyarekar
2012-08-13 14:12         ` Jan Kratochvil
2012-08-13 14:24           ` Siddhesh Poyarekar
2012-08-17  9:35           ` [PATCH 4/3] bitpos: Expand parameters of watchpoint functions Siddhesh Poyarekar
2012-08-19 16:42 ` Jan Kratochvil [this message]
2012-08-21  6:51   ` bitpos expansion patches summary Siddhesh Poyarekar
2012-08-26 18:21 ` Jan Kratochvil
2012-08-27  8:10   ` Siddhesh Poyarekar
2012-08-27 14:02     ` Jan Kratochvil
2012-09-02 18:15 ` Jan Kratochvil
2012-09-07 10:52   ` Siddhesh Poyarekar
2012-09-11 19:04     ` Jan Kratochvil
2012-09-11 19:26       ` Tom Tromey
2012-09-11 19:37         ` Jan Kratochvil
2012-09-13 18:45       ` Jan Kratochvil
2012-09-13 16:48     ` Jan Kratochvil
2012-09-14  6:20       ` Siddhesh Poyarekar
2012-09-04 15:03 ` Jan Kratochvil
2012-09-04 15:09   ` Siddhesh Poyarekar
2012-09-07 11:10   ` Siddhesh Poyarekar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120819164147.GA27469@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=siddhesh@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox