473,387 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Writing safer C programs

Can some one please point me to a comprehensive resource for writing C
programs?I checked out Steve Summit's FAQ.
Thanks,
Pradyot
Nov 13 '05 #1
8 2859
On 3 Dec 2003 17:35:43 -0800, pr*******@yahoo.com (Pradyot Dhulipala)
wrote in comp.lang.c:
Can some one please point me to a comprehensive resource for writing C
programs?I checked out Steve Summit's FAQ.
Thanks,
Pradyot


Somehow the adjective "safer" did not make it from your subject line
into the body of the message. But assuming you still meant "safer":

Safer C: Developing Software for High-integrity and Safety-critical
Systems Engineering)
Les Hatton
Paperback 229 pages (1 December, 1994)
Publisher: McGraw-Hill Education - Europe; ISBN: 0077076400

C Traps and Pitfalls
Andrew Koenig
Paperback 160 pages (January 1989)
Publisher: Addison Wesley; ISBN: 0201179288

Expert C Programming: Deep C Secrets
Peter Van Der Linden
Paperback 350 pages (30 April, 1994)
Publisher: Prentice Hall; ISBN: 0131774298

Also:

Guidelines for the Use of the C Language in Vehicle Based Software
The Motor Industry Software Reliability Association (MISRA)
Available only directly from http://www.misra.co.uk.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 13 '05 #2
Pradyot Dhulipala <pr*******@yahoo.com> wrote:
Can some one please point me to a comprehensive resource for writing C
programs?I checked out Steve Summit's FAQ.
Thanks,
Pradyot


something else to try is linking a garbage collector into your program.
Do some googling, i'm not sure what it's called, but someone wrote a good
reliable, gc. that entirely eliminates core dumps caused by frees and also
eliminates some memory leaks.

--
Harrison Caudill | .^ www.hypersphere.org
Computer Science & Physics Double Major | | Me*Me=1
Georgia Institute of Technology | v' I'm just a normal guy
Nov 13 '05 #3
> Can some one please point me to a comprehensive resource for writing C
programs?I checked out Steve Summit's FAQ.


http://www.oreilly.com/catalog/secureprgckbk/index.html

http://secureprogramming.com/

WBR SK

Nov 13 '05 #4

"Jack Klein" <ja*******@spamcop.net> wrote in message
news:49********************************@4ax.com...
On 3 Dec 2003 17:35:43 -0800, pr*******@yahoo.com (Pradyot Dhulipala)
wrote in comp.lang.c:
Can some one please point me to a comprehensive resource for writing C
programs?I checked out Steve Summit's FAQ.
Thanks,
Pradyot


Somehow the adjective "safer" did not make it from your subject line
into the body of the message. But assuming you still meant "safer":

Safer C: Developing Software for High-integrity and Safety-critical
Systems Engineering)
Les Hatton
Paperback 229 pages (1 December, 1994)
Publisher: McGraw-Hill Education - Europe; ISBN: 0077076400

C Traps and Pitfalls
Andrew Koenig
Paperback 160 pages (January 1989)
Publisher: Addison Wesley; ISBN: 0201179288

Expert C Programming: Deep C Secrets
Peter Van Der Linden
Paperback 350 pages (30 April, 1994)
Publisher: Prentice Hall; ISBN: 0131774298

Also:

Guidelines for the Use of the C Language in Vehicle Based Software
The Motor Industry Software Reliability Association (MISRA)
Available only directly from http://www.misra.co.uk.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq


I've seen Cyclone mentioned in various places. "Cyclone is a programming
language based on C that is *safe*...", says the website. Although it is
designed to be compatible with C, it isn't exactly the same. Might not be
totally relevant, but could otherwise be of some interest.

http://www.research.att.com/projects/cyclone/

Paul.
Nov 13 '05 #5
On Thu, 4 Dec 2003, Jack Klein wrote:
On 3 Dec 2003 17:35:43 -0800, pr*******@yahoo.com (Pradyot Dhulipala)
wrote in comp.lang.c:
Can some one please point me to a comprehensive resource for writing C
programs?I checked out Steve Summit's FAQ.
Thanks,
Pradyot
Somehow the adjective "safer" did not make it from your subject line
into the body of the message. But assuming you still meant "safer":

Safer C: Developing Software for High-integrity and Safety-critical
Systems Engineering)
Les Hatton
Paperback 229 pages (1 December, 1994)
Publisher: McGraw-Hill Education - Europe; ISBN: 0077076400

C Traps and Pitfalls
Andrew Koenig
Paperback 160 pages (January 1989)
Publisher: Addison Wesley; ISBN: 0201179288

Expert C Programming: Deep C Secrets
Peter Van Der Linden
Paperback 350 pages (30 April, 1994)
Publisher: Prentice Hall; ISBN: 0131774298

Also:

Guidelines for the Use of the C Language in Vehicle Based Software
The Motor Industry Software Reliability Association (MISRA)
Available only directly from http://www.misra.co.uk.


One small correction: http://www.misra.org.uk
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq


--
Send e-mail to: darrell at cs dot toronto dot edu
Don't send e-mail to vi************@whitehouse.gov
Nov 13 '05 #6
On 4 Dec 2003 16:38:07 GMT, da*****@NOMORESPAMcs.utoronto.ca.com
(Darrell Grainger) wrote in comp.lang.c:
On Thu, 4 Dec 2003, Jack Klein wrote:
On 3 Dec 2003 17:35:43 -0800, pr*******@yahoo.com (Pradyot Dhulipala)
wrote in comp.lang.c:
Can some one please point me to a comprehensive resource for writing C
programs?I checked out Steve Summit's FAQ.
Thanks,
Pradyot


Somehow the adjective "safer" did not make it from your subject line
into the body of the message. But assuming you still meant "safer":

Safer C: Developing Software for High-integrity and Safety-critical
Systems Engineering)
Les Hatton
Paperback 229 pages (1 December, 1994)
Publisher: McGraw-Hill Education - Europe; ISBN: 0077076400

C Traps and Pitfalls
Andrew Koenig
Paperback 160 pages (January 1989)
Publisher: Addison Wesley; ISBN: 0201179288

Expert C Programming: Deep C Secrets
Peter Van Der Linden
Paperback 350 pages (30 April, 1994)
Publisher: Prentice Hall; ISBN: 0131774298

Also:

Guidelines for the Use of the C Language in Vehicle Based Software
The Motor Industry Software Reliability Association (MISRA)
Available only directly from http://www.misra.co.uk.


One small correction: http://www.misra.org.uk


Thanks!

Nov 13 '05 #7
Thanks a lot.I was hoping for online resources.I am not able to get
the books by the time I need them.
Safer C programing tips along the lines of don't use gets, strcpy etc.

Thanks,
Pradyot
Jack Klein <ja*******@spamcimop.net> wrote in message news:<49********************************@4ax.com>. ..
On 3 Dec 2003 17:35:43 -0h800, pr*******@yahoo.com (Pradyot Dhulipala)
wrote in comp.lang.c:
Can some one please point me to a comprehensive resource for writing C
programs?I checked out Steve Summit's FAQ.
Thanks,
Pradyot


Somehow the adjective "safer" did not make it from your subject line
into the body of the message. But assuming you still meant "safer":

Safer C: Developing Software for High-integrity and Safety-critical
Systems Engineering)
Les Hatton
Paperback 229 pages (1 December, 1994)
Publisher: McGraw-Hill Education - Europe; ISBN: 0077076400

C Traps and Pitfalls
Andrew Koenig
Paperback 160 pages (January 1989)
Publisher: Addison Wesley; ISBN: 0201179288

Expert C Programming: Deep C Secrets
Peter Van Der Linden
Paperback 350 pages (30 April, 1994)
Publisher: Prentice Hall; ISBN: 0131774298

Also:

Guidelines for the Use of the C Language in Vehicle Based Software
The Motor Industry Software Reliability Association (MISRA)
Available only directly from http://www.misra.co.uk.

Nov 13 '05 #8
In <2d*************************@posting.google.com> pr*******@yahoo.com (Pradyot Dhulipala) writes:
Safer C programing tips along the lines of don't use gets, strcpy etc.


Whoever told you to avoid strcpy is a patent idiot. Unlike gets, it is
perfectly possible to use strcpy in a fully portable and safe manner.

If you don't know what you're doing, you can't use pointers, arrays,
signed arithmetic and floating point arithmetic. Try writing some
useful real world applications with what's left.

If you know what you're doing, you don't need any safer C programming
tips, so my advice is to simply learn C (up to the point where K&R2 and
its exercises have no more secrets for you).

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: mark1822 | last post by:
Hi, I am trying to figure out if I should learn C and C++ to write CGI programs, or if I should just use PHP for my web site. I want to write a high traffic website that would call executibles...
6
by: DanielEKFA | last post by:
Hey there :) I was once told that the STL classes had member functions to write their data to disk and to restore that data. Searching google (and why are there no "stl" or "map" manpages?), it...
15
by: Douglas Garstang | last post by:
All, I posted a newsgroup question here a few weeks back, asking some questions that related to my 10 year quest (so far) to understand pointers. Someone suggested I write a simple emulator....
9
by: 100 | last post by:
Has anybody read Steve Maguire's book "Writing solid code"? Do you think that the ideas in this book are not applicable in c# language? Does anybody find if(2 == i) istead of if(i == 2) as...
0
by: s99999999s2003 | last post by:
hi in my environment, besides shell scripts written for sys admin tasks, there are shell scripts that call java programs which in turn will do various processing like connecting to databases and...
5
by: UJ | last post by:
I have a system that has five programs that all communicate with each other via Message Queues. Works well. One program is a watchdog that will make sure the others are up and going. Currently I...
22
by: JoeC | last post by:
I am working on another game project and it is comming along. It is an improvment over a previous version I wrote. I am trying to write better programs and often wonder how to get better at...
9
by: Ben Bacarisse | last post by:
I am porting a program from the Windows world to the Linux world. The source uses MS's new "safer" string functions such as: strcat_s(dest, size, source); but there are also calls such as: ...
35
by: jleslie48 | last post by:
I've written a cgi program in C using the borland 5.5 free compiler, and it runs just fine on an Apache server. My only issue is if I issue some system calls the cgi suspends until the call...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.