Displaying 6 results from an estimated 6 matches for "mkchar2".
Did you mean:
mkchar
2008 Apr 25
2
Bug in R 2.7 for over long lines (crasher+proposed fix!) (PR#11281)
...if(!LongLine)
> error(_("unable to allocate space for source line %
d"), xxlineno);
> strncpy(LongLine, (char *)p0, nc);
> bug --> LongLine[nc] =3D '\0';
> SET_STRING_ELT(source, lines++,
> mkChar2((char *)LongLine));
> free(LongLine);
>=20
> note that LongLine is only nc chars long, so the LongLine[nc]=3D'\0'
might
> be an out of bounds write. the fix would be to do
>=20
> =EF=BB=BF char *LongLine =3D (char *) malloc(nc+1);
>=20
> in lin...
2008 Apr 25
1
Bug in R 2.7 for over long lines
...= (char *) malloc(nc);
if(!LongLine)
error(_("unable to allocate space for source line %d"), xxlineno);
strncpy(LongLine, (char *)p0, nc);
bug --> LongLine[nc] = '\0';
SET_STRING_ELT(source, lines++,
mkChar2((char *)LongLine));
free(LongLine);
note that LongLine is only nc chars long, so the LongLine[nc]='\0' might
be an out of bounds write. the fix would be to do
? char *LongLine = (char *) malloc(nc+1);
in line 3034
Please fix and thanks to dirk for the debian r-bas...
2008 May 10
0
Bug in R 2.7 for over long lines (crasher+proposed fix!) (PR#11438)
...ce for source line %
> >>
> > d"), xxlineno);
> >
> >> strncpy(LongLine, (char *)p0, nc);
> >> bug --> LongLine[nc] =3D '\0';
> >> SET_STRING_ELT(source, lines++,
> >> mkChar2((char *)LongLine));
> >> free(LongLine);
> >> =20
> >> note that LongLine is only nc chars long, so the LongLine[nc]=3D'\0'
> >>
> > might
> >
> >> be an out of bounds write. the fix would be to do
> >> =2...
2008 Apr 26
0
Bug in R 2.7 for over long lines (crasher+proposed fix!) (PR#11284)
...("unable to allocate space for source line %
>> =20
> d"), xxlineno);
> =20
>> strncpy(LongLine, (char *)p0, nc);
>> bug --> LongLine[nc] =3D3D '\0';
>> SET_STRING_ELT(source, lines++,
>> mkChar2((char *)LongLine));
>> free(LongLine);
>> =3D20
>> note that LongLine is only nc chars long, so the LongLine[nc]=3D3D'\0'=
>> =20
> might
> =20
>> be an out of bounds write. the fix would be to do
>> =3D20
>> =3DEF=3DBB=3DBF...
2004 Jun 08
5
fast mkChar
...ng
custom read functions (in C). By timing various approaches I figured out
that one of the bottlenecks in reading character fields is the mkChar()
function which on each call incurs a lot of garbage-collection-related
overhead.
I wonder if there is a "vectorized" version of mkChar, say mkChar2(char
**, int length) that converts an array of C strings to a string vector,
which somehow amortizes the gc overhead over the entire array?
If no such function exists, I'd appreciate any hint as to how to write
it.
Thanks,
Vadim
[[alternative HTML version deleted]]
2008 May 10
1
(PR#11281) Bug in R 2.7 for over long lines (crasher+proposed
...line %
>>>>
>>> d"), xxlineno);
>>>
>>>> strncpy(LongLine, (char *)p0, nc);
>>>> bug --> LongLine[nc] =3D '\0';
>>>> SET_STRING_ELT(source, lines++,
>>>> mkChar2((char *)LongLine));
>>>> free(LongLine);
>>>> =20
>>>> note that LongLine is only nc chars long, so the LongLine[nc]=3D'\0'
>>>>
>>> might
>>>
>>>> be an out of bounds write. the fix would be to do
>...