asserts at call sites.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14534
#include "pub_core_basics.h" // SizeT
-/* Allocate(zeroed), free, strdup, memdup, shrink, all in VG_AR_DINFO. */
+/* Allocate(zeroed), free, strdup, memdup, shrink, all in VG_AR_DINFO.
+ The allocation functions never return NULL. */
void* ML_(dinfo_zalloc)( const HChar* cc, SizeT szB );
void ML_(dinfo_free)( void* v );
HChar* ML_(dinfo_strdup)( const HChar* cc, const HChar* str );
gx = ML_(dinfo_zalloc)( "di.readdwarf3.msGX.1",
sizeof(GExpr) + bytesReqd );
- vg_assert(gx);
p = pstart = &gx->payload[0];
vg_assert(nbytes >= 1);
gx = ML_(dinfo_zalloc)( "di.readdwarf3.mgGX.2", sizeof(GExpr) + nbytes );
- vg_assert(gx);
VG_(memcpy)( &gx->payload[0], (UChar*)VG_(indexXA)(xa,0), nbytes );
vg_assert( &gx->payload[nbytes]
== ((UChar*)gx) + sizeof(GExpr) + nbytes );
fieldE.Te.Field.name
= ML_(dinfo_strdup)( "di.readdwarf3.ptD.member.3",
"<anon_field>" );
- vg_assert(fieldE.Te.Field.name);
if (fieldE.Te.Field.typeR == D3_INVALID_CUOFF)
goto_bad_DIE;
if (fieldE.Te.Field.nLoc) {
+ VG_(strlen)(egrep) + VG_(strlen)(tmpname)
+ 100/*misc*/;
HChar* cmd = ML_(dinfo_zalloc)("di.readpe.fnopf.cmd", cmdlen);
- vg_assert(cmd);
VG_(sprintf)(cmd, "%s -c \"%s '%s' | %s '\\.pdb|\\.PDB' >> %s\"",
sh, strings, pename, egrep, tmpname);
vg_assert(cmd[cmdlen-1] == 0);
}
HChar* pdbname = ML_(dinfo_zalloc)("di.readpe.fnopf.pdbname", szB + 1);
- vg_assert(pdbname);
pdbname[szB] = 0;
Int nread = VG_(read)(fd, pdbname, szB);