473,809 Members | 2,506 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Safe C library

We have discussed often the proposition from Microsoft
for a safer C library.

A rationale document is published here by one of the members of
the design team at microsoft:
http://msdn.microsoft.com/msdnmag/is...C/default.aspx

jacob
Feb 4 '07
72 4459
Bryan a écrit :
<snip>

I know Rich, and he does have a sense of humour, he's just not a big
fan of idiots.

P.S. Hi Rich, how's stuff ?
If he doesn't like idiots, as you say, why do you
expect an answer?

:-)
Feb 5 '07 #31
On 5 Feb, 12:33, jacob navia <j...@jacob.rem comp.frwrote:
Bryan a écrit :
<snip>
I know Rich, and he does have a sense of humour, he's just not a big
fan of idiots.
P.S. Hi Rich, how's stuff ?

If he doesn't like idiots, as you say, why do you
expect an answer?

:-)
What makes you think I expect an answer ?

;-)

Feb 5 '07 #32
[attribs abbrev'd]
Bryan said:
artifact wrote:
>Kenny McCormack wrote:
artifact wrote:
<snip>
>Grow a sense of humour please.
He does. It is heathfield (and others, but heathfield is the
archetype) who has none.

Well I can't discount that, I don't know either of them.

<snip>

I know Rich, and he does have a sense of humour,
Oh no I don't!
he's just not a big fan of idiots.
Actually, I don't have a problem with idiots per se. I just don't think
they should try to write computer programs. But that doesn't seem to
stop them, alas.
The "difficult bit in the title" post should make it obvious to anyone
who knows the reference.
Indeed - but so few people nowadays have the benefit of a classical
education. I blame the Government.
P.S. Hi Rich, how's stuff ?
At this point, I think we'd better take it to email. This is hardly the
place to share even a virtual beer. :-)

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Feb 5 '07 #33
In article <W-*************** *************** @bt.com>, Richard Heathfield
<rj*@see.sig.in validwrites
>Chris Hills said:
>In article <BK************ *************** ***@comcast.com >, Joe Wright
<jo********@co mcast.netwrites
>>>Chris Hills wrote:
<snip>
>>>BTW it covers all 2000 functions in the C library..... :-)

There are 2,000 functions ?

AFAIR there are 483 in the ISO standard library...

If that is true and my count of 140 in C89 is correct (and if it isn't,
it's at least approximately right), C99 must have added well over 300
functions, more than trebling the size of the library. I found that
hard to believe, so I went and had a look. I didn't actually count
them, but it looks about right, yes. I still find it hard to believe,
but it does appear to be true.

Now you know why I get pissed of when people here piously say we only
do "Standard" C here but include K&R1, K&R2, ANSI 89 ISO C90,
93,95,96, 99 all and any National versions and any committee draft (of
any vintage) as "Standard C"

Then scream at any one who mentions anything that is "not standard C"
when 95% of the real programming community use C as per a subset of
some of the standards above with extensions.

Well, when MS get their "safe c" though you will find that all the MS
programmers will KNOW that the MS library is "Standard C" (because of
the TR). They will also know that by definition anyone not using the MS
C library will not be standard or safe....

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys. org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Feb 5 '07 #34
In article <11************ *********@p10g2 000cwp.googlegr oups.com>,
santosh <sa*********@gm ail.comwrites
>Chris Hills wrote:
>In article <BK************ *************** ***@comcast.com >, Joe Wright
<jo********@co mcast.netwrites
>Chris Hills wrote:
In article <87************ @bsb.me.uk>, Ben Bacarisse
<be********@b sb.me.ukwrites
jacob navia <ja***@jacob.re mcomp.frwrites:

We have discussed often the proposition from Microsoft
for a safer C library.

A rationale document is published here by one of the members of
the design team at microsoft:
http://msdn.microsoft.com/msdnmag/is...C/default.aspx

This is one the most preposterous documents I've seen[1]. It would
make an interesting tutorial if it was as an essay from and
undergraduate , but as a serious proposal from a major software
company? Might it actually get in?
Unfortunately yes.
I argued against it from the fist time I saw it in 2004.
BTW it covers all 2000 functions in the C library..... :-)

There are 2,000 functions ?

AFAIR there are 483 in the ISO standard library... The remainder are
in the MS library.

What *will* happen is MS will say that "their" SAFE-C library is ISO
approved. Also the only people who can support the full ISO-C SAFE.
Library is MS "everyone else is non-standard"

This is why I was not happy when I first saw it in 2004.

It will mean by implication and marketing that MS has a standards
conforming SAFE library and everyone else has an unsafe non conforming
library....

How can Microsoft's C library be conforming if it doesn't yet support
all of C99's requirements?
It is as good as most and better than quite a few I have been told by
people who should know.
>Also, if the "Safe C" functions do get
approved by ISO, (touch wood)
I hope not as they are not really "safe" as such
>, doesn't it mean that other implementors
would add them to their libraries too?
Yes... So you add them to an 8051 library.... The 8051 is an 8 bit micro
that makes you about 30% of the MCU our in the world today...

The point is apart from the fairly narrow PC programming circles no one
wants or needs the MS library. There are many 8 and 16 bit systems put
there where this library is pointless.
How then will MS's library
alone be a "Safe" C library, let alone a conforming one?
Very good question
>Forgive my ignorance of ISO methodologies, if any.
Actually this will be a TR or ISO Technical Report. This is NOT part of
the standard but as MS people will tell you most TR's eventually become
part of the standard. However whilst most do get in some do not.

I had reports of MS people suggesting that "it will be in the next
standard" However this is her-say I have not seen that in print or had
it said to me personally. Though they have crossed that line on the
C++ C++/CLI bun fight AFAIK

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys. org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Feb 5 '07 #35
Chris Hills said:

<snip>
>
Well, when MS get their "safe c" though you will find that all the MS
programmers will KNOW that the MS library is "Standard C" (because of
the TR). They will also know that by definition anyone not using the
MS C library will not be standard or safe....
Sure, but then many MS programmers KNOW that main returns void, that
fflush(stdin) clears to newline, that gets is a perfectly acceptable
input technique, and so on and so forth. I'm not overly impressed by
the "knowledge" of such MS programmers.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Feb 5 '07 #36
In article <nf************ *************** ***@bt.com>, Richard Heathfield
<rj*@see.sig.in validwrites
>Chris Hills said:

<snip>
>>
Well, when MS get their "safe c" though you will find that all the MS
programmers will KNOW that the MS library is "Standard C" (because of
the TR). They will also know that by definition anyone not using the
MS C library will not be standard or safe....

Sure, but then many MS programmers KNOW that main returns void, that
fflush(stdin ) clears to newline, that gets is a perfectly acceptable
input technique, and so on and so forth. I'm not overly impressed by
the "knowledge" of such MS programmers.
Me neither but if enough of them believe it is the standard and MS
behave like it is we have the same situation as BASIC.

ISO Obsoleted the ISO BASIC standard a few years ago because the whole
world ignored it and uses VB instead.

ISO C is hardly alive and well now. Few C99 implications. No one really
that bothered or since 1999 they would have fully implemented it.

The other problem is that globally these days most cs students learn MS
languages
..


--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys. org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Feb 5 '07 #37
Chris Hills said:

<snip>
ISO C is hardly alive and well now.
C89 thrives. C99 is dead in the water.
Few C99 implications. No one
really that bothered or since 1999 they would have fully implemented
it.
Yes, because C99 was a fairly pointless exercise. C89 remains an
excellent, high-performance, extensible, widely-used language. Yes,
there are things that could be done to improve it, but C99 included
almost none of them, and put a load of extraneous stuff in instead. One
can hardly blame implementors for ignoring it.
The other problem is that globally these days most cs students learn
MS languages
That's their problem, not mine. :-)

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Feb 5 '07 #38
Chris Hills <ch***@phaedsys .orgwrites:
In article <11************ *********@p10g2 000cwp.googlegr oups.com>,
santosh <sa*********@gm ail.comwrites
[...]
How can Microsoft's C library be conforming if it doesn't yet support
all of C99's requirements?

It is as good as most and better than quite a few I have been told by
people who should know.
The point, I presume, is that it conforms to C90 but not to C99 (as
many libraries do, at least to a first approximation).

[...]
, doesn't it mean that other implementors
would add them to their libraries too?

Yes... So you add them to an 8051 library.... The 8051 is an 8 bit
micro that makes you about 30% of the MCU our in the world today...

The point is apart from the fairly narrow PC programming circles no
one wants or needs the MS library. There are many 8 and 16 bit systems
put there where this library is pointless.
If this library, as advertised, provides "safer" versions of standard
library functions, it should be useful on any hosted implementation,
not just in "fairly narrow PC programming circles". It might not be
useful on embedded (freestanding) implementations -- but the same is
true of most of the standard library, and nobody complains about the
fact that the standard library is part of the standard. (People
certainly complain about the standard library, but not usually about
its existence.)

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 5 '07 #39
In article <_P************ *********@bt.co m>,
Malcolm McLean <re*******@btin ternet.comwrote :
>I've just shelled out over 500 pounds on a nice new dual core machine with
Windows Vista. I installed my version of Visual Studio and, guess what, the
C library is the safest imaginable. The compiler won't link in any code at
all or produce an executable. Such heights of security could not be achieved
by any other company.
Perhaps it's just enforcing the EULA, which apparently prohibits working
around any technical limitations in the software.
If it doesn't do whatever it is your program does when it's shipped,
that's Obviously a technical limitation, so you're not allowed to do
anything about it.
dave

--
Dave Vandervies dj******@csclub .uwaterloo.ca
Don't worry. All my mistakes are strictly necessary. (And I didn't make the
unnecessary mistake of which you are thinking.)
--Richard Heathfield in comp.programmin g
Feb 5 '07 #40

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

Similar topics

8
1918
by: Ola Natvig | last post by:
Anybody out there who knows if the 4suite implementation of XSLT are a threadsafe one? -- -------------------------------------- Ola Natvig <ola.natvig@infosense.no> infoSense AS / development
4
7318
by: Peter Tragardh | last post by:
Is it possible to automate Source Safe the way Office is automated by writing your own code? What I would like to do is to create some code to enhance Source Safe, to customize it. There is an official object model for Office. Does one like it exist for Source Safe? /Peter
3
1969
by: Sam | last post by:
Does anyone know if the .NET Framework defines a set of classes that allow you to access Visual Source Safe within your C# programs I know there is some type of COM interface (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvss/html/vssauto.asp?frame=true) that allows programmers to access Visual Source Safe from a VB or C++ app, however; I hoping to avoid accessing non-managed code from my C# apps
6
1281
by: Peter Strøiman | last post by:
Hi. I have a situation where I have a web project and a class library in the same solution. The web project uses the class library. Therefore, I created a "project reference" in the web project to the call library. This creates a subfolder for my web application called "bin" where the output of my class library is placed. The problem is that this bin directory is placed in source safe when I check in the project to source control. And...
4
1421
by: Sridhar | last post by:
Hi, I have a question regarding the Global Assembly Cache (GAC) and Source Safe. We have some common dlls which we would like to put in GAC so that they can be used in different applications. We are using Source Safe as a Version Control. Let's say I have created a data access library( one of common dll) and put in the source safe. I have created one web application which needs to access this data access dll. Can I put this data access...
1
10364
by: Macca | last post by:
Hi I have a N-tier ASP.NET application that uses a data access tier to get data from a database and pass it to the middleware/business tier for processing/filtering and then passes the modified data to the web tier for presentaion. What I would like to do is introduce a cache to the middleware tier to cut down on the round trips to the database.
2
4209
by: clintonb | last post by:
I'm using: Microsoft Visual Studio 2005 Version 8.0.50727.42 Issue 1: We have a solution with a web project and some class library projects. The web project references the class library projects via a project reference. Whenever we compile the class library projects, their dlls are added to the bin folder of the web project. Visual Studio wants to add
44
7870
by: climber.cui | last post by:
Hi all, Does anyone have experience on the thread-safty issue with malloc()? Some people said this function provided in stdlib.h is not thread- safe, but someone said it is thread safe. Is it possible this function evolves from thread-unsafe to thread-safe in recent years? How could i find out? I am using the C library coming with GNU linux distribution. thanks a lot.
3
1526
by: =?Utf-8?B?anBhdHJjaWs=?= | last post by:
Don't see any official notice that compiled library dll's loaded in the BIN directory of an asp.net website need to be thread safe, but concurrent visits to the same web site sure bear this out. Does anyone know the answer to this?
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10387
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7662
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.