Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5945097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:38:02+00:00 2026-05-22T16:38:02+00:00

What is the relation between _SECURE_SCL and _HAS_ITERATOR_DEBUGGING . Is it possible to turn

  • 0

What is the relation between _SECURE_SCL and _HAS_ITERATOR_DEBUGGING.
Is it possible to turn on/off range checking and preserve binary compatibility?

Any difference between 2008 and 2010 versions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:38:03+00:00Added an answer on May 22, 2026 at 4:38 pm

    Stephan Lavavej has provided some detail on this _SECURE_SCL and _HAS_ITERATOR_DEBUGGING:

    From http://blogs.msdn.com/b/vcblog/archive/2007/08/10/the-future-of-the-c-language.aspx

    Iterator debugging, enabled by
    _HAS_ITERATOR_DEBUGGING, performs powerful correctness verification.
    Iterator checking, enabled by
    _SECURE_SCL, performs minimal checks that serve as a last line of security
    defense. For example, _SECURE_SCL
    will terminate a program that triggers
    a heap overrun with a vector iterator.

    All that is explained by MSDN
    documentation. The story behind this
    is interesting. The
    _HAS_ITERATOR_DEBUGGING functionality was provided by Dinkumware, the
    company that licenses their most
    triumphant implementation of the
    Standard Library for inclusion in
    Visual Studio. The _SECURE_SCL
    functionality was added by Microsoft,
    in order to improve the security of
    programs running on Windows. In order
    to perform their checks, both
    _HAS_ITERATOR_DEBUGGING and _SECURE_SCL make iterators contain additional data members, such as
    pointers to their parent containers.
    _HAS_ITERATOR_DEBUGGING, because it is enabled by default in debug mode (and
    not obtainable in release mode), also
    builds singly linked lists that allow
    containers to refer to all of their
    iterators. This is expensive
    performance-wise, but performance is
    not critical in debug mode, and this
    enables excellent checks.

    _SECURE_SCL, because it is enabled by default in release mode, strives to
    impose minimal performance penalties.
    Therefore, when it is enabled,
    although iterators have pointers back
    to their containers, containers don’t
    have pointers to their iterators.
    (Updating “iterator lists” is too
    time-consuming for release mode.)

    Note that starting in VS 2010, _SECURE_SCL is no longer enabled by default in release mode (the above excerpt is from 2007).

    As described in this bug report (http://connect.microsoft.com/VisualStudio/feedback/details/334315/has-iterator-debugging-0-causes-crash), both _SECURE_SCL and _HAS_ITERATOR_DEBUGGING affect the ABI:

    _SECURE_SCL and _HAS_ITERATOR_DEBUGGING significantly change the behavior and
    representations of STL containers and
    iterators. VC9 (Visual Studio 2008)
    made the representations of STL
    containers and iterators even more
    strongly dependent on _SECURE_SCL and
    _HAS_ITERATOR_DEBUGGING (this was done to fix a conformance bug).

    Because these macros change the
    representations of STL objects, you
    must observe certain rules when
    changing these macros from their
    defaults. I described the rules here:
    http://blogs.msdn.com/vcblog/archive/2007/08/10/the-future-of-the-c-language.aspx#4617984 To summarize, the macros must be
    consistent within each binary (EXE or
    DLL), and furthermore, binaries that
    pass STL objects to each other must
    have consistent macro settings. Your
    example involves an EXE and DLL
    passing a vector between
    themselves, so the EXE and DLL need to
    have the same _SECURE_SCL and
    _HAS_ITERATOR_DEBUGGING settings.

    These rules apply to VC8, VC9, and all
    future versions. Your code happened to
    work with VC8 (Visual Studio 2005),
    but would fail if it did more
    complicated things.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any relation between doctype of an HTML document and browser rendering speed?
What is the difference and relation between Page description language , markup language and
Is there is any relation between numbers' bits when one is divisible by another?
Is there any relation between the Bundle Identifier we see in Info.plist and the
is there any way to add a relation between 2 tables in different databases
Possible Duplicate: Relation between REPL, interpreter and compiler I've been experimenting on heroku.com with
What is the difference between adodb and oledb ? What is the relation between
What is the relation between parser combinators and recursive descent parsers?
What is the relation between two Oracle database terms name and SID ?
How to create a relation between two tables using PHPMyAdmin?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.