Re: Best Way to Create String Variables in Assembly



bwaichu{at}yahoo.com <bwaichu@xxxxxxxxx> wrote:
> I am running openBSD. And from the man page for brk, sbrk:
> How should I approach this string problem? Since I am
> coding assembly, I am not really worried about portability.

As I believe has been mentioned upthread, it depends on the
length of strings you expect.

I'm sure you've tasted Theo's high-security flavoring
of OpenBSD. Accordingly, I would suggest you put your
strings on the heap via .bss or sbrk(). Do not worry about
overallocating, AFAIK OpenBSD is an overcommit CoW system.
Overusing may be a problem, then you will want to use LIFO
so you can sbrk() to free.

The one place you should _not_ put strings is the stack,
especially without rigorous length checking. That's how
buffer overflow exploits are done, and Theo has taken great
pains to review OpenBSD to remove vulnerabilities. He might
get upset, and you're not being true to your system.

-- Robert

.



Relevant Pages

  • Re: Why no really lite/heavy gauges?
    ... Unless your truss rod is an I-beam, ... The only string problem I had was with my son's Ibanez. ... Proper strings and all was sorted. ...
    (alt.guitar)
  • Re: Yet One More String Question
    ... Alliance carbon G-string and it sounds much better than the D'Addario ... I have tried these colored strings but it was pretty much not worth it. ... The carbon fiber string seems to be just light years ahead - it's the answer to the G string problem. ... The European question is a good one. ...
    (rec.music.classical.guitar)